Enterprise Apps: Education App Part 4

Objective: Set up Animation States for the Horse

For the Animations, we want to be able to transition from full horse to exposed muscle and exposed muscle to bone when the next button is pressed. We then want to reverse the transitions when the previous button is pressed. We will also have the ability to go and forward between states. As you can see in the image above we use an integer parameter which will be used to trigger the transition states, also shown above.

We set up a UIManager script and create a public Animator which is set in the inspector using the horse prefab(which has an animator component attached). We also create a public int for the animation states. Thes states will represent

0: Full Horse, 1: Muscle Exposed, 2: Bones Exposed

Next and Previous methods are created and triggered using OnClick events on the UI buttons.

Switch statements are used to transition and set anim states.

--

--

--

Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Baby Taylor Doctor Day

Baby Taylor Doctor Day

US: Carving a pineapple for Halloween amid pumpkin shortage — Dole

Mighty Morphin #3 Review

Mighty Morphin #3 Review

Sprinkler irrigation System: Types, advantages and disadvantages

She just ran into what, she was running away.⚖️✍️🗞️💽🦅

South Carolina Bound!

🗣️Don't Miss this Airdrop it's very good project so joining first💰💰 🚀 HUDI Wallet Airdrop 💰…

Incremental Action, Clubhouse, Notion Bar & Lessons Learnt From Selling 1000+ Businesses

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Simon Leen

Simon Leen

Developer

More from Medium

My journey becoming a Unity game developer: Make a game look beautiful-Creating Ceilings pt.1

Mobile Game Progression

Creating A Retro Game Over Behavior

Magnetism in Unity Made Easy!