Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mary674

Pages: [1]
1
Support / Re: Change TileMap graphics dynamically
« on: January 01, 2014, 12:30:58 am »
Thank you, but how would I go about that?
I've tried this:

public GameObject summer; (this is the sprite collection)
public Texture fallTexture;    (this is the texture in the data folder)
summer.GetComponent<tk2dSpriteCollectionData>().textures[0] = fallTexture;

This doesn't do anything... Sorry for being a complete newbie. :P

2
Support / Change TileMap graphics dynamically
« on: December 31, 2013, 12:55:29 am »
Hello,
I would like to be able to change a Tilemap's graphics dynamically via script.
Is it feasible, and if so, what would be the simplest method?

I thought about changing the Sprite Collection it uses, but there doesn't seem to be an easy way to do it and I am not familiar enough with the code to figure it out by myself. I don't even know if it would be the right way to do it.

To be more specific, I want to change the seasons in my game depending on a variable. I would like the graphics of my Tilemap to change accordingly. For that purpose, I have 4 identically placed TileSheets, with only the colors being different depending on the season. The graphics would change without having to reload.

Thank you very much!

Pages: [1]