コード例 #1
0
    public override void OnStompEvent(PlayerPlatformer player)
    {
        if (state == State.Stunned)
        {
            return;
        }

        base.OnStompEvent(player);

        player.SetEnemyJump();
        if (stunCoroutine != null)
        {
            StopCoroutine(stunCoroutine);
        }
        stunCoroutine
            = StartCoroutine(StunState(5 * new Vector2((!player.facingRight ? -1 : 1), .6f),
                                       (int)(stunTime * 60),
                                       player.facingRight));
    }
コード例 #2
0
    public override void OnStompEvent(PlayerPlatformer player)
    {
        if (stunned)
        {
            return;
        }

        base.OnStompEvent(player);

        ResetValues();

        if (state == State.Dizzy)
        {
            StopAllCoroutines();
        }

        player.SetEnemyJump();

        state = State.Idle;
        ResetValues();
        StartCoroutine(StunState(5 * new Vector2((!player.facingRight ? -1 : 1), .6f),
                                 (int)(stunTime * 60),
                                 player.facingRight));
    }
コード例 #3
0
 public virtual void OnStompEvent(PlayerPlatformer player)
 {
     player.SetEnemyJump();
     Vanish();
 }