Back

Monday 13.6 | Animated Enemy

Platformer Prototype

Adding an animated enemy around which I will be building the enemy functionality hopefully within this week. As much as possible is yoinked from the player systems. Today I got the enemy's basic patroling movement and hit reaction working.

Enemy Animator System

I'll implemented enemy animations with a single Animator Controller and just change the animations within it using Animator Override Controllers.

EnemyCoolGuy

Reacting to hits

I use a blend tree for changing the reaction direction. In the code I have an Enum that has the type of reactions and I use this when setting reactions, making the code a lot more readable.

EnemyCoolGuy

Day's Work

  • Enemy
    • Import "Cool Guy" as enemy
      • Old model I got from sketchfab some time ago (Heavily optimized)
      • Animations from mixamo
      • Model Machete
    • Reacting to damage (Only gut atm other animations I got were from left and right and I'm going to be implementing those tomorrow)
    • Set up everything ready for attacking
      • Use the Weapon Manager that the player also uses (Just less detection points)
      • EnemyBehaviour (The script every enemytype script will inherit from)
      • CoolGuy (The enemytype specific script, atm empty)
      • Animator
        • Stolen from player
        • Using Animator Override Controller as a animator controller prefab
      • Patrolling is the same as what the old enemies' had
  • Fixed bug with player's attack cooldown
Back