Player Got Damage!- Game Dev Series 24

Objective: Create damage animation to player.

Previous: Creating Enemy Explosions

Since our Player has 3 chances before game over, we can create the damage animation in each step to show how dangerous our Player is.

Drag in first sprite of Player_Hurt animation to hierarchy and adjust the size. Create an animation with this game object.

Rename it as Right_Damage and drag it under Player as a child. Then adjust the position to right engine.

Duplicate this as Left_Damage, and set these game object as disable. Then we can create some code to active these 2.

Inside the Player script, as usual we need to create variables to the game object. Then under the lives calculation, active the specific damage effect due to lives count.

Press Play and watch our player get hurts!

--

--

--

A passionate gamer whose goal is to work in video game development.

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

Recommended from Medium

Dfyn Burns $210,000 Worth of $DFYN Tokens

Mission Log | 2/22/22 | Airdrop

FIO Update: 7/13/2020

How Do I Present My App Idea to an Engineer?

Rails: Start multiple processes with one command in development

Misconceptions about SCRUM Meetings

First Project: CLI

Anna Coding Front-end Weekly News Week — 20

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
S.J. Jason Liu

S.J. Jason Liu

A passionate gamer whose goal is to work in video game development.

More from Medium

Building a Custom Cinemachine Virtual Camera Zoom Feature with One Button in Unity

Gamedev Log: “Slash’n’crack” #2 (Unity/C#)

New Pooling API in Unity 2021

Day 105: Working with Animation Events in Unity