Hi! I'm making an infinite runner game, so I decided to make some store with upgrades and visual skins for the player...But I have no idea of making skin system! I mean that I don't know how to make skin replace standart sprite when player chooses it, cos there is no button "replace sprite" <img src="smileys/smiley17.gif" border="0" align="middle" /> )) I thought about using different animations for each skin but on the one object. I need some professional advice! <img src="smileys/smiley9.gif" border="0" align="middle" /> Thanks in advance!
You can possibly destroy the old sprite and create the new one in the same position?
Edit: Or create an animation frame of all the skins and just change the frame depending on what skin you want.
How its done is my game is there is a variale
"skin"
Its default is 0
Oh This is too hard to explain, let me make you an example, make things much easier...
Forget it,
On click buy
If cash is 100 or above
Skin = 1
If skin = 1
Animation = bought1
Very simple!
Now just make an animation Bought1 with the new look you want
Your idea of using different animations on the same sprite is the way to go in most cases.
Develop games in your browser. Powerful, performant & highly capable.
Thanks! I'll try using some variables with animations <img src="smileys/smiley32.gif" border="0" align="middle" />