Ejemplo n.º 1
0
        playerData ConvertBuildingDataBaseVersionToBuilding(PlayerForDataBase newB)
        {
            playerData bForD = new playerData();

            bForD.addingCoinRate   = newB.addingCoinRate;
            bForD.addingElixirRate = newB.addingElixirRate;
            bForD.coin             = newB.coin;
            bForD.elixir           = newB.elixir;
            bForD.ID = newB.ID;
            bForD.lastTimeVariableUpdate = newB.lastTimeVariableUpdate;
            return(bForD);
        }
Ejemplo n.º 2
0
        public void AddPlayerInfo(PlayerForDataBase newB)
        {
            bool isFind = false;

            foreach (playerData bForD in playersList)
            {
                if (bForD.ID == newB.ID && !isFind)
                {
                    isFind = true;
                }
            }
            if (isFind)
            {
                ErrorSystem.AddBigError("playerListManager.AddPlayerInfo. player is in the data base");
            }
            else
            {
                playerData newbuilding = ConvertBuildingDataBaseVersionToBuilding(newB);
                playersList.Add(newbuilding);
            }
        }