Nerd For Tech
Published in

Nerd For Tech

Update: Death Animations

I have added the death animations to the enemies and the player.

This was done by going through each enemy and the player and recording the death animation.

Use a trigger parameter to trigger the death animation from any state.

For the enemies, create a coroutine in the enemy class and call it in a protected method.

Then call the method to start the coroutine on each enemy.

It is similar for the player. Set the trigger in the player animation script.

Create a coroutine in the player script.

Then start the coroutine when the player runs out of lives.

Now the basic combat system is complete.

--

--

--

NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.

Recommended from Medium

The Magic Behind the Commons Simulator — Part 3: The Closest Look

Beginner’s Guide to Flutter : 2.1 Building UI

On accessibility of burgers

Community Update: May 2020

gRPC Basics Part 2: Rest and Swagger

Ways to log database queries in Spring/JDBC

How to craft a PHP package

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
Matthew Clark

Matthew Clark

Unity Game Developer and C# Programmer

More from Medium

The simplest way to create a First Person Shooter! (Part 3)

Unity Tutorial — Toon Shade in HLSL

2D Mobile Game: Player Jump!

What is Filebase and How do you use it?