Hi all
I have a script called "Health" which just does some general health tracking on the game object. It also has a method inside it called "Killed()", which fires when the health drops below 1. My plan was to have a class property which takes a Clip from the tk2d animator and then play it. The problem is there doesn't seem to be a property that allows me to just assign a Clip to a script.
I had a look at the Mole tutorial and it appears in there they have a game object which contains a tk2d sprite animator (for the dust animation), then they instantiate that game object whenever they need an animation. I guess this would work, but it seems a little redundant to have a collection of clips in my animation collection (ie. Running, Jumping, Dying), but then have to create a second set of prefabs also called Running, Jumping, Dying, which are instantiated as needed.
Can clips be chosen directly as class properties? If not, is creating a list of matching prefabs and animation clips the best way to go? Is there a cleaner way to do this?
Cheers!