예제 #1
0
 void Shoot()
 {
     if (InputManager.MouseButtonDown(0) && !hasShoot && ammo > 0 && !paused)
     {
         Ammo -= 1;
         SoundManager.CreateSound("Shoot");
         CreateBullet();
         hasShoot = true;
         StartCoroutine(coolDownShoot());
     }
 }
예제 #2
0
    void Damage(int amount)
    {
        Life -= amount;
        PushHit();
        SoundManager.CreateSound("Hit");

        if (Life <= 0)
        {
            PausedData.DeadPause();
        }

        Hited = true;
    }