Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Survival Shooter - 07 Harming Enemies - Why we need animation event

Discussion in 'Animation' started by folkeg, Sep 28, 2016.

  1. folkeg

    folkeg

    Joined:
    Sep 15, 2016
    Posts:
    6
    I do not understand why we need animation event in Enemy Death Animation and why we need "Start Sinking" function in Enemy Health class as well as the code in Update() :
    if(isSinking)
    {
    // ... move the enemy down by the sinkSpeed per second.
    transform.Translate (-Vector3.up * sinkSpeed * Time.deltaTime);
    }

    If we need this, why we do not need to write such thing in Player's Health and in Player Death Animation?
    Thanks!
     
  2. CloudKid

    CloudKid

    Joined:
    Dec 13, 2015
    Posts:
    207
    hmmm what?