示例#1
0
    //

    /*If the player is in this state, they will always do whatever is in state update.
     * Which includes accepting new input and */
    public void StateUpdate()
    {
        pi.playerScript.Idle();
        mi = pi.GetMovementInput();
        ri = pi.GetRunInput();
        ji = pi.GetJumpInput();
        spellInputTable = pi.GetSpellInputTable();
        cancelSpell     = pi.GetCancelInput();
    }
示例#2
0
    //

    /*If the player is in this state, they will always do whatever is in state update.
     * Which includes accepting new input and */
    public override void StateUpdate()
    {
        pi.playerScript.Idle();
        mi = pi.GetMovementInput();
        ji = pi.GetJumpInput();
        ai = pi.GetAimInput();
        //Default playerstate behavior to swap weapons in any state
        HandleWeaponSwapInput(pi);
    }
示例#3
0
 public void StateUpdate()
 {
     mi = pi.GetMovementInput();
     ri = pi.GetRunInput();
     spellInputTable = pi.GetSpellInputTable();
     ji = pi.GetJumpInput();
     pi.playerScript.GroundMovement(mi.x, mi.y, mi.magnitude);
     pi.playerScript.Run(ri.magnitude);
     cancelSpell = pi.GetCancelInput();
 }
 public override void StateUpdate()
 {
     mi        = pi.GetMovementInput();
     jumpInput = pi.GetJumpInput();
     //Only allow the player to jump if they stop pressing the jump input
     if (jumpInput == 0f)
     {
         canJump = true;
     }
     cancelClimb = pi.GetCancelClimbInput();
     //Default playerstate behavior to swap weapons in any state
     HandleWeaponSwapInput(pi);
 }
示例#5
0
 public override void StateUpdate()
 {
     mi        = pi.GetMovementInput();
     jumpInput = pi.GetJumpInput();
     pi.playerScript.GroundMovement(mi);
     pi.playerScript.GetPlayerRigidbody().velocity = new Vector3(0, fallingVelocity, 0);
     if (jumpInput == 0f)
     {
         superJumpReady = true;
     }
     //Default playerstate behavior to swap weapons in any state
     HandleWeaponSwapInput(pi);
 }
示例#6
0
    public override void StateUpdate()
    {
        fi  = pi.GetFireWeaponInput();
        mi  = pi.GetMovementInput();
        rsi = pi.GetRightStickInput();
        ji  = pi.GetJumpInput();
        ai  = pi.GetAimInput();

        if (fi > 0f)
        {
            pi.playerScript.FireCurrentWeapon();
        }
        else
        {
            pi.playerScript.StopFireWeapon();
        }

        pi.playerScript.Strafe(mi, rsi);
        //Default playerstate behavior to swap weapons in any state
        HandleWeaponSwapInput(pi);
    }
示例#7
0
 public override void StateUpdate()
 {
     mi           = pi.GetMovementInput();
     jumpInput    = pi.GetJumpInput();
     jumpProgress = pi.playerScript.Jump(startPosition, startTime, mi);
 }