Dungeon Escape — Attack Animations

Going over how I implemented my player’s attack animations in Unity

Objective: Going through my implementation of attack animations for my Unity mobile game, Dungeon Escape.

Regular Attack Animation

To begin, I will be using the following set of sprites to create my animation (some not shown):

Using these sprites, I can create the animation for my player’s regular attack. With the animation properly setup, you get a result as shown in the gif below.

With our animation now created, we can now hook up logic for when it should be called. First, we need to set the conditions up in Unity’s Animator window.

This is is how my Animator window logic is hooked up for this animation. Now, using some C# code, I am able to trigger the attack animation with a left-click. Once implemented, I got the result shown below.

More Animations

Running Attack Animation
Sword Arc Animation

That’s all for today! Thanks for taking the time to read today’s article. In the next article, I will be cleaning up the player sprite and adding a camera follow.




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

Recommended from Medium

Performance Tuning Methodology

Generate an EAN-13 Barcode Image in Ruby

5 Most Used and Loved Programming Languages By Developers

Cover image

HMock: First Rate Mocks in Haskell

Downfall of the Data Engineer, Open Data Collaboration, Building Mega Open-Source Projects; ThDPTh…

How to set GitBash as the default NPM script runner on Windows

For professors’ note: use PVS-Studio to get students familiar with code analysis tools

How to Create Lottie Animations for Xamarin

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
Gabe Gomez

Gabe Gomez

More from Medium

Platformer: Collectible & Status Bar

Coding the exit for full screen

Installing Probuilder In Unity

VFX — Adding an exploding asteroid to start enemy waves