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 override bool TryToConsumeInput(GamepadAction input) { if (input.GetActionID().Equals(con2.GamepadAction.ID.INTERACT)) { EndMinigame(); 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 (!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) { var interactingPlayer = m_mainManager.GetPlayerById(input.GetPlayerId()); var noOwner = Owner == null; var samePlayer = Owner.ID == interactingPlayer.ID; if (m_started && (noOwner || samePlayer) && CheckPlayerIsNear(interactingPlayer.gameObject)) { if (!noOwner && m_playerHolding.IsHoldingObject()) { return(false); } return(TryToConsumeInput(input)); } return(false); }
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 bool ConsumeInput(GamepadAction input) { if (m_InputConsumers == null) { return(false); } foreach (IInputConsumer consumer in m_InputConsumers) { if (consumer.ConsumeInput(input)) { 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); }
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); }
//Pass player input on to the non-abstract minigame if the player is in range and facing the station public abstract bool TryToConsumeInput(GamepadAction input);
public Sprite GetSprite(GamepadAction ia) { Sprite s; lookup.TryGetValue(ia, out s); return s; }