Which code do I use to change animation of Spine? (Noob..)

I’ve imported an animation from Spine and want the animation to change according to the actions of my player.
I’ll use an if statement for it but I don’t know how to change the state of the animation from within the code…
I’m a real noob so go easy on me…(=

Thanks in advance!

[18057-image+129.png|18057]

I am assuming you are using a FPS kit because this is a script. So basically, you would make another script and in the update function or another function, you would write:
Since that script is in C# I will provide my answer in C#.

void Update(){
        if(characterIsWalking){whereEverTheSkeletonAnimationScriptIs.GetComponent<SkeletonAnimation>().Animation = enumNameOfTheAnimationThingy.walk;} else {   whereEverTheSkeletonAnimationScriptIs.GetComponent<SkeletonAnimation>().Animation = enumNameOfTheAnimationThingy.jump;
    }
    }

Sorry for the HORRIBLE formatting as Unity does not like super long lines.