Jump to content

Phaser not loading on ios and ONLY on ios


elitian
 Share

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?

Link to comment
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! 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...