public bool ConsumeInput(GamepadAction input) { if (input.GetActionID().Equals(con2.GamepadAction.ID.PUNCH) || input.GetActionID().Equals(con2.GamepadAction.ID.XBUTTON)) { if (IsHoldingObject()) { return(true); } } if (input.GetActionID().Equals(con2.GamepadAction.ID.INTERACT)) { if (IsHoldingObject()) { DropObject(m_playerRB.velocity * 0.5f + m_throwForce * transform.forward, true); } else if (GetNearestItem()) { PickUpObject(); } else { return(false); } return(true); } return(false); }
public bool ConsumeInput(GamepadAction input) { if (input.GetActionID().Equals(GamepadAction.ID.HORIZONTAL) || input.GetActionID().Equals(GamepadAction.ID.VERTICAL)) { return(false); } else { return(timerElapsed / timerMax <= 0.9f); } }
public bool ConsumeInput(GamepadAction input) { if (input.GetActionID().Equals(con2.GamepadAction.ID.HORIZONTAL)) { float joystick = input.m_axisValue; movementDirection.x = joystick; return(true); } if (input.GetActionID().Equals(con2.GamepadAction.ID.VERTICAL)) { float joystick = input.m_axisValue; movementDirection.z = joystick; return(true); } return(false); }
public override bool TryToConsumeInput(GamepadAction input) { if (input.GetActionID().Equals(con2.GamepadAction.ID.INTERACT)) { EndMinigame(); return(true); } return(false); }
public override bool TryToConsumeInput(GamepadAction input) { if (input.GetActionID().Equals(con2.GamepadAction.ID.HORIZONTAL2)) { float joystick = input.m_axisValue; if (Mathf.Abs(joystick) > 0.1f) { m_pointingDirection.x = joystick; } return(true); } if (input.GetActionID().Equals(con2.GamepadAction.ID.VERTICAL2)) { float joystick = input.m_axisValue; if (Mathf.Abs(joystick) > 0.1f) { m_pointingDirection.y = joystick; } return(true); } return(false); }
public override bool TryToConsumeInput(GamepadAction input) { if (input.GetActionID().Equals(ID.LEFT_TRIGGER)) { if (m_expectingLeft && m_leftWasRaised && input.m_axisValue > 0.9f) { m_leftWasRaised = false; AcceptMash(); } if (!m_leftWasRaised && input.m_axisValue < 0.7f) { m_leftWasRaised = true; } return(true); } if (input.GetActionID().Equals(ID.RIGHT_TRIGGER)) { if (!m_expectingLeft && m_rightWasRaised && input.m_axisValue > 0.9f) { m_rightWasRaised = false; AcceptMash(); } if (!m_rightWasRaised && input.m_axisValue < 0.7f) { m_rightWasRaised = true; } return(true); } return(false); }
public bool ConsumeInput(GamepadAction input) { if (!m_canCastFireball) { return(false); } if (input.GetActionID().Equals(con2.GamepadAction.ID.XBUTTON)) { CastFireball(); return(true); } return(false); }
public override bool TryToConsumeInput(GamepadAction input) { if (input.GetActionID().Equals(m_inputToMash)) { m_currentNumberOfPresses++; m_masher.Mash(); m_mashUI.MakingProgress(); if (m_currentNumberOfPresses >= m_numberOfPressesRequired) { EndMinigame(); } return(true); } return(false); }
public bool ConsumeInput(GamepadAction input) { if (!m_canPunch) { return(false); } if (input.GetActionID().Equals(con2.GamepadAction.ID.PUNCH)) { m_anim.Slap(); StartCoroutine(HitAfterShortDelay()); StartCoroutine(PunchCooldown()); return(true); } return(false); }
public bool ConsumeInput(GamepadAction input) { switch (input.GetActionID()) { case GamepadAction.ID.START: ActivatePauseUI(); return(true); case GamepadAction.ID.PUNCH: if (IsPaused) { Resume(); return(true); } break; } return(false); }