private MoveDir GetMoveDirection(WiFiPlayerInput i_PlayerInput) { if (i_PlayerInput == null) { return(MoveDir.None); } else if (i_PlayerInput.GetNegativeButtonDown(s_WiFiPlayerInput_Horizontal)) { return(MoveDir.Left); } else if (i_PlayerInput.GetPositiveButtonDown(s_WiFiPlayerInput_Horizontal)) { return(MoveDir.Right); } else if (i_PlayerInput.GetPositiveButtonDown(s_WiFiPlayerInput_Vertical)) { return(MoveDir.Up); } else if (i_PlayerInput.GetNegativeButtonDown(s_WiFiPlayerInput_Vertical)) { return(MoveDir.Down); } return(MoveDir.None); // Something went wrong. }
protected override bool InternalGetRightButton() { if (m_PlayerInput != null) { return(m_PlayerInput.GetPositiveButtonDown("Horizontal")); } return(false); }
public void Frame(WiFiPlayerInput i_PlayerInput) { if (i_PlayerInput == null) { return; } bool move = false; move |= i_PlayerInput.GetNegativeButtonDown(s_WiFiPlayerInput_Vertical); move |= i_PlayerInput.GetPositiveButtonDown(s_WiFiPlayerInput_Vertical); bool submit = i_PlayerInput.GetButtonDown(s_WiFiPlayerInput_Submit); InternalUpdate(move, submit); }