void Update() { if (isMine) { if (!m_ActionRequested) { if (m_CharacterInput != null) { m_ActionRequested = m_CharacterInput.GetButtonDown(InputActions.s_AttractButton); } else { m_ActionRequested = false; } } if (m_CharacterInput != null) { m_ButtonPressed = m_CharacterInput.GetButton(InputActions.s_AttractButton); } else { m_ButtonPressed = false; } } if (m_Graphics != null) { m_Graphics.SetActive(m_Running); } }
void Update() { if (isMine) { if (!m_ActionRequested) { if (m_CharacterInput != null) { bool buttonDown = m_CharacterInput.GetButtonDown(InputActions.s_TauntButton); if (buttonDown) { m_ActionRequested = true; } } } } }
void Update() { if (isMine) { // Check input. if (!m_KickRequested) { if (m_CharacterInput != null) { bool actionTriggered = m_CharacterInput.GetButtonDown(InputActions.s_PassButton); if (actionTriggered) { m_KickRequested = true; } } } } }
void Update() { if (isMine) { // Update axes. if (m_CharacterInput != null) { m_HorizontalAxis = m_CharacterInput.GetAxis(InputActions.s_HorizontalAxis); m_VerticalAxis = m_CharacterInput.GetAxis(InputActions.s_VerticalAxis); } else { m_HorizontalAxis = 0f; m_VerticalAxis = 0f; } // Update actions. if (!m_DashRequested) { float axisValue = Mathf.Max(Mathf.Abs(m_HorizontalAxis), Mathf.Abs(m_VerticalAxis)); if (axisValue > 0.001f) { if (m_CharacterInput != null) { bool dashTriggered = m_CharacterInput.GetButtonDown(InputActions.s_ShotButton); if (dashTriggered) { m_DashRequested = true; } } } } } UpdateEffectTimer(Time.deltaTime); }