Example #1
0
        protected void GenerateEmptyIdenities()
        {
            m_PlayerIdentities.Clear();
            for (int i = 0; i < m_Players.Length; i++)
            {
                PlayerIdentity playerIdentity = new PlayerIdentity();
                playerIdentity.UpdateNumber(i);
                m_PlayerIdentities.Add(i, playerIdentity);
            }
            UpdatePlayerIdentities();

            m_UnusedIdentities.Clear();
            int identitiesCount = 0;

            foreach (int number in m_CharacterSet.Values)
            {
                identitiesCount += number;
            }
            for (int i = 0; i < identitiesCount - m_Players.Length + 1; i++)
            {
                PlayerIdentity unusedIdentity = new PlayerIdentity();
                unusedIdentity.UpdateNumber(i);
                m_UnusedIdentities.Add(unusedIdentity);
            }
            UpdateUnusedIdentities();
        }
Example #2
0
        private void ReceiveUnusedIdentityHistory(int index, int characterId)
        {
            PlayerIdentity unusedIdentity = new PlayerIdentity();

            unusedIdentity.UpdateNumber(index);
            unusedIdentity.UpdateIdentity(characterId);

            m_UnusedIdentitiesHistory[m_GameHistoryIndex].Add(unusedIdentity);
        }
Example #3
0
        private void ReceivePlayerIdentityHistory(int playerNumber, PhotonPlayer player, int characterId)
        {
            PlayerIdentity playerIdentity = new PlayerIdentity();

            playerIdentity.UpdateNumber(playerNumber);
            playerIdentity.UpdatePlayer(player);
            playerIdentity.UpdateIdentity(characterId);

            m_PlayerIdentitiesHistory[m_GameHistoryIndex][playerNumber] = playerIdentity;
        }