Пример #1
0
    public void HandleDeath()
    {
        dying         = true;
        timeRemaining = deathTime;
        SnailMovement snailMovement = GetComponent <SnailMovement>();

        snailMovement.canMove = false;
        transform.Translate(-1.0f, 0.0f, 0.0f);
        Debug.Log("hi");
    }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     if (dying)
     {
         if (timeRemaining > 0)
         {
             a.SetBool("Flinch", true);
             transform.Translate(pushBackPerTick, 0.0f, 0.0f);
             timeRemaining -= 1;
         }
         else
         {
             a.SetBool("Flinch", false);
             dying = false;
             SnailMovement snailMovement = GetComponent <SnailMovement>();
             snailMovement.canMove = true;
         }
     }
 }
 private void Awake()
 {
     instance = this;
 }
 void Start()
 {
     snailMovement = SnailMovement.instance;
 }