// add a coin pile to the list public void AddCoinPile(System.Drawing.Point coinPosition, int coinLifeTime, int coinValue) { CoinPile coin = new CoinPile(); coin.X = coinPosition.X; coin.Y = coinPosition.Y; coin.LifeTime = coinLifeTime; coin.DisappearTime = (int)Global.GameTime.TotalGameTime.TotalMilliseconds + coin.LifeTime; coin.CoinValue = coinValue; coinPiles.Add(coin); }
// remove selected coin pile from the list public void RemoveCoinPile(CoinPile coinPile) { coinPiles.Remove(coinPile); }