Hello, I'm having a problem with animations - they only run while the key is being pressed. This works fine for running and jumping, but I need something for, say, spell casting - that interrupts if you move but otherwise keeps running until through. I tried different key commands but I'm not sure what to use. This is what I have at the moment.
if(Input.GetKey(KeyCode.Keypad2))
{
if (canSpin > 4.0)
{
playerSprite.DoAnim("MinaSpin");
// On animation end
playerSprite.SetAnimCompleteDelegate(SpinEnd);
//Preven animation from playing for 1 second
}
}
These are 2D animations using Sprite Manager 2, by the way.
Thanks a bunch for your help!