コード例 #1
0
    public GameObject RemoveMarble()
    {
        if (currentMarble == null)
        {
            return(null);
        }

        var temp = currentMarble;

        currentMarble = null;
        state         = SPACE_STATE.UNOCCUPIED;
        return(temp);
    }
コード例 #2
0
 public void AddMarble(PLAYER player, GameObject marble)
 {
     currentMarble = marble;
     currentMarble.transform.SetParent(transform);
     state = player == PLAYER.PLAYER1 ? SPACE_STATE.OCCUPIED_PLAYER1 : SPACE_STATE.OCCUPIED_PLAYER2;
 }
コード例 #3
0
 private WIN_STATE GetWinState(SPACE_STATE spaceState)
 {
     return(spaceState == SPACE_STATE.OCCUPIED_PLAYER1 ? WIN_STATE.PLAYER1_WON : WIN_STATE.PLAYER2_WON);
 }