How do I add animations to these assets? I purchased both of them the other day, I love everything so far, I'm off to a great start already with building a game that would work around them, added my own custom skins, tweaked some animations, etc... but I'm having trouble figuring out how to add controls for brand new animations.
I added a crouch animation inside Spine, exported the character to Unity, including the new animation, but I'm having a hard time wrapping my head around how to modify the HitmanController.cs to include the new "Crouch" animation that I added. I basically just want to have the character crouch when I pressed down on the left joystick on an XBOX controller.
I tried adding Crouch to enum ActionState, and then added the entry in UpdateAnim(), so now if "state = ActionState.CROUCH" then ideally, it would play the crouch animation. I then tried to add the controls in the Input() section, but that just causes the character to freeze in place.
if (moveStick.y < -0.25f) {
state = ActionState.CROUCH;
}
So now when I press down on the left thumbstick, it just freezes in the middle of whatever animation I'm in, and the character slides to a stop. The crouch animation isn't working at all, and then the character just freezes in place, and I can't move again without resetting the game.
Is there an easy way to add new animations to these characters? I don't really want to break any of the current controls, because I like the way everything controls so far, but I'm hoping to find an easy way to do something like...
"If I use one of my custom control entries, then it'll play my custom animations, otherwise, handle everything as it normally would." I feel like I'm stuck in a bowl of spaghetti trying to figure out where the right place to set my custom animations would be.