Esempio n. 1
0
 public void RemoveAntiMine(AntiMine antiMine)
 {
     if (GameModel.CellsInView.ContainsKey(antiMine.CellID))
     {
         antiMine.Stop();
         GameModel.CellsInView[antiMine.CellID].MapOverlay.RemoveAntiMine();
         AntiMines.TryRemove(antiMine.CellID, out AntiMine value);
     }
 }
Esempio n. 2
0
        public async Task <AntiMine> CreateAntiMine(int cellID)
        {
            AntiMine aMine = new AntiMine(cellID, ID);
            await Database.AddAntiMine(ID, cellID);

            await Wallet.SubtractConfinium(GameModel.ANTI_MINE_BASE_PRICE);

            await Database.UpdatePlayerWallet(ID, Wallet.Confinium);

            AntiMines.TryAdd(cellID, aMine);

            return(aMine);
        }