void Fly_Enter()
    {
        _animator.Play("Atk_Weapon");

        // if ( DamageKey == "Atk_3" ) {
        //  transform.GetChild ( 1 )?.SetLocalPosition ( 0f, -0.545f );
        // }

        _attackEventListener.OnHitPlayerEnterEvent += OnAttackHit;

        CupheadTime.WaitForSeconds(this, FlyDestroyTime, CupheadTime.Layer.Enemy, () => currentState = State.Boom);
    }
    void Fly_Enter()
    {
        _animator.Play("Atk_Weapon");

        CupheadTime.WaitForSeconds(this, FlyDestroyTime, CupheadTime.Layer.Enemy, () => {
            if (currentState == State.Fly)
            {
                currentState = State.Fade;
            }
        });

        _damageDealer.ignoreReceiverOnDealDamage = true;

        // Debug.Log ( $"angle: {angle}" );
    }
Example #3
0
 void Track_Enter()
 {
     CupheadTime.WaitForSeconds(this, Duration, CupheadTime.Layer.Enemy, () => currentState = State.Fade);
     _timer = 0f;
     transform.SetPosition(Target.position.x);
 }
Example #4
0
 protected Coroutine DelayTask(float time, System.Action callback)
 {
     return(CupheadTime.WaitForSeconds(pmFSM, time, timeLayer, callback));
 }