Example #1
0
 public void Update()
 {
     if (player.WorldObjectLookingAt() != null && input.GetButtonDown("Fire2"))
     {
         stateManager.SwitchStates(new InventoryTransferState(stateManager));
     }
     else if (player.NPCLookingAt() != null && input.GetButtonDown("Fire2"))
     {
         stateManager.SwitchStates(new NPCInteractionState(stateManager));
     }
     else if (input.GetButtonDown("Menu"))
     {
         stateManager.SwitchStates(new InventoryState(stateManager));
     }
 }
 public void Update()
 {
     if (input.GetButtonDown("Menu") || input.GetButtonDown("Cancel") || input.GetButtonDown("Fire2"))
     {
         stateManager.SwitchStates(new IdleState(stateManager));
         player.playerStateManager.SwitchStates(new WalkState(player.playerStateManager));
     }
 }