public override void IsChanging(PlayerStateEntry upperState)
 {
     if (status.GetWallJumped())
     {
         upperState.ChangeState(wallJumping);
     }
     else if (status.GetCliffHeld())
     {
         upperState.ChangeState(cliffHolding);
     }
 }
Exemplo n.º 2
0
 public override void IsChanging(PlayerStateEntry upperState)
 {
     if (!status.GetSlideButton())
     {
         upperState.ChangeState(running);
     }
     else if (!status.GetRunButton())
     {
         upperState.ChangeState(waiting);
     }
 }
Exemplo n.º 3
0
 public override void IsChanging(PlayerStateEntry upperState)
 {
     if (status.GetDamaged())
     {
         upperState.ChangeState(damaging);
         //waitingTimerがあるのはすぐにwaitingに移ってしまうため
     }
     else if (status.GetIsGrounded() && waitingTimer > thresholdTime)
     {
         upperState.ChangeState(moving);
     }
 }
Exemplo n.º 4
0
    public override void IsChanging(PlayerStateEntry upperState)
    {
        AnimatorStateInfo info    = anim.GetCurrentAnimatorStateInfo(0);
        float             endTime = info.normalizedTime;

        if (status.GetDamaged())
        {
            upperState.ChangeState(damaging);
        }
        else if (endTime >= 0.65f &&
                 (info.IsName("Attack1") || info.IsName("Attack2") || info.IsName("Attack3")))
        {
            upperState.ChangeState(upperState.GetPreState());
        }
    }
 public override void IsChanging(PlayerStateEntry upperState)
 {
     if (jumpOff) //下に落ちるなら
     {
         upperState.ChangeState(jumpingWithUpToDown);
     }
     else if (curCliffHeld && !preCliffHeld)         //このステートの中で崖つかまりした瞬間
     {
         upperState.ChangeState(cliffHolding);
     }
     else if (!curCliffHeld && preCliffHeld && !jumpOn)         //離れた瞬間
     {
         upperState.ChangeState(jumpingWithUpToDown);
     }
 }
 public override void IsChanging(PlayerStateEntry upperState)
 {
     if (status.GetIsGrounded())
     {
         upperState.ChangeState(moving);
     }
 }
 public override void IsChanging(PlayerStateEntry upperState)
 {
     if (status.GetDamaged())
     {
         upperState.ChangeState(damaging);
     }
     else if (status.GetJumpButtonDown())
     {
         upperState.ChangeState(jumping);
     }
     else if (status.GetAttackButtonDown())
     {
         upperState.ChangeState(attacking);
     }
     else if (status.GetJumpingOff())
     {
         upperState.ChangeState(jumping);
     }
 }
 public override void IsChanging(PlayerStateEntry upperState)
 {
     if (status.GetJumpButtonDown() && jumpingNextTimer > thresholdTime)
     {
         upperState.ChangeState(jumpingSecond);
     }
     else if (status.GetWallJumped())
     {
         upperState.ChangeState(wallJumping);
     }
     else if (status.GetCliffHeld())
     {
         upperState.ChangeState(cliffHolding);
     }
     else if (status.GetMaxJumped() && jumpingNextTimer > thresholdTime)
     {
         upperState.ChangeState(jumpingWithUpToDown);
     }
 }
    public override void IsChanging(PlayerStateEntry se)
    {
        AnimatorStateInfo info            = anim.GetCurrentAnimatorStateInfo(0);
        float             currentAnimTime = info.normalizedTime;

        if (Input.GetButtonDown("Attack") &&
            info.IsName("Attack2"))
        {
            se.ChangeState(attackingThird);
        }
    }
 public override void IsChanging(PlayerStateEntry upperState)
 {
     if (status.GetCliffHeld())
     {
         upperState.ChangeState(cliffHolding);
     }
     //次の壁についた瞬間
     else if (!preWallJumped && curWallJumped)
     {
         upperState.ChangeState(wallJumping);
     }
     //ジャンプが最大距離に達していて、ジャンプした後の時間が閾値を超えたら
     else if (status.GetMaxJumped() &&
              firstTimer > thresholdTime)
     {
         upperState.ChangeState(jumpingWithUpToDown);
     }
     else if (status.GetIsNearForWallJumped())
     {
         upperState.ChangeState(jumpingWithUpToDown);
     }
 }
    public override void IsChanging(PlayerStateEntry upperState)
    {
        AnimatorStateInfo info = anim.GetCurrentAnimatorStateInfo(0);
        float             currentDamagedTime = info.normalizedTime;
        bool curNockBack = (currentState == nockBacking);

        if (currentDamagedTime >= 0.5f && status.GetIsGrounded())
        {
            if (info.IsTag("NockBack"))
            {
                status.SetDamaged(false);
                upperState.ChangeState(moving);
            }
        }
    }