Пример #1
0
 public CupData(string cupIDString, int numberOfRounds, int numberOfPlayers)
 {
     //Initialize Array
     cupID        = cupIDString;
     rounds       = new RoundData[Mathf.Abs(numberOfRounds)];
     numOfPlayers = numberOfPlayers;
     for (int i = 0; i < rounds.Length; i++)
     {
         //Populate Array
         rounds[i] = new RoundData(numberOfPlayers);
     }
 }
Пример #2
0
        private void SaveRound(RoundData data, int roundNumber)
        {
            if (m_cupData == null)
            {
                Debug.Log("Load Cup");
                LoadCup();
            }

            if (m_cupData != null)
            {
                data.roundNumber = roundNumber;
                m_cupData.rounds[roundNumber] = data;
            }
        }
Пример #3
0
 public void RoundComplete(RoundData roundData)
 {
     //Save the RoundData to the Cup data
     SaveRound(roundData, m_currentRound - 1);
     m_roundComplete = true;
 }