elitian

Phaser not loading on ios and ONLY on ios

Recommended Posts

Somehow phaser is not loading on IOS, yet loads fine on all else. Don't know what could be causing this, and it happens on multiple projects... What are the differences between IOS and the rest of the devices?

Share this post


Link to post
Share on other sites

Sorry, didn't offer much information because I thought it was some sort of limitation on IOS system.

Found the problem, although can't explain why.

This function was messing everything up:

animateFontSize:function(text_item_from_all_to_be_animated_text_entities, max_size, min_size, size_change_rate=1)
	{
		// add 
		//item[] = true to the create function
		item = text_item_from_all_to_be_animated_text_entities
		if( item[1] && item[0].fontSize < max_size)
		{
			item[0].fontSize += size_change_rate
			if(item[0].fontSize == max_size)
			{
				item[1] = false
			}
		}
		if(!item[1] && item[0].fontSize > min_size)
		{
			item[0].fontSize -= size_change_rate
			if(item[0].fontSize == min_size)
			{
				item[1] = true
			}
		}
	}

where text_item_from_all_to_be_animated_text_entities is an array containing arrays of 2 elements: [text bitmaptext objects from Phaser framework, does_text_needs_to_grow]. For some reason this was messing up the game on IOS browser... Don't know why, but all is good now! 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.