コード例 #1
0
ファイル: Boss.cs プロジェクト: SmokinVita/Galaxy-Shooter-2D
 public void SetState(EnemyCurentState enemyCurentState)
 {
     _currentState = enemyCurentState;
     if (enemyCurentState == EnemyCurentState.Attacking)
     {
         canFire = true;
     }
     else
     {
         StopAllCoroutines();
     }
 }
コード例 #2
0
ファイル: Boss.cs プロジェクト: SmokinVita/Galaxy-Shooter-2D
    private void Damage(int dmgAmount)
    {
        if (_isInvincible)
        {
            return;
        }
        _health -= dmgAmount;

        if (_health <= 0)
        {
            _currentState = EnemyCurentState.Dead;
            Instantiate(_explosion, transform.position, Quaternion.identity);
            Destroy(gameObject, .5f);
        }
    }
コード例 #3
0
ファイル: Boss.cs プロジェクト: SmokinVita/Galaxy-Shooter-2D
 private void Start()
 {
     anim          = GetComponent <Animator>();
     _currentState = EnemyCurentState.Idle;
 }