Beispiel #1
0
 private void DeadCheck()
 {
     if (health <= minhealth)
     {
         health = minhealth;
         if (!dead)
         {
             dead = true;
             anim.SetBool("Ground", true);
             anim.SetTrigger("Die");
             //anim.CrossFade("MP_die",0f);
             //Destroy(gameObject,3f);
             if (currentTag == "Player")
             {
                 playermovement.Move(Vector2.zero);
                 playermovement.enable = false;
             }
         }
     }
     else
     {
         if (dead)
         {
             dead = false;
             //Revive
             if (currentTag == "Player")
             {
                 playermovement.enable = true;
             }
         }
     }
 }
 private void FixedUpdate()
 {
     _playerMovement.Move(new Vector3(xInput, 0f, yInput));
 }