예제 #1
0
 private void UpdateIdle()
 {
     if (_player != null)
     {
         _fireGroundState = FireGroundState.Triggered;
     }
 }
예제 #2
0
    private void Awake()
    {
        _activationCooldownCounter = 0;
        _fireGroundState           = FireGroundState.Idle;

        _animator = GetComponent <Animator>();
    }
예제 #3
0
    private void UpdateLightUp()
    {
        _animator.SetTrigger(LIGHT_UP_ANIM);
        _fireGroundState = FireGroundState.Idle;

        AudioSource.PlayClipAtPoint(FireSfx, transform.position, GameManager.Instance.Volume);

        if (_player != null)
        {
            _player.TakeDamage();
        }
    }
예제 #4
0
 private void UpdateTriggered()
 {
     if (_activationCooldownCounter < ActivationCooldown)
     {
         _activationCooldownCounter += Time.deltaTime;
     }
     else
     {
         _activationCooldownCounter = 0;
         _fireGroundState           = FireGroundState.LightUp;
     }
 }