private LivesManager() { Timer = new Timer(); Timer.Elapsed += Timer_Elapsed; Timer.Interval = 6000; Timer.Start(); LevelStart.GameStarted += LevelStart_GameStarted; LivesRefreshTime = RemoteConfigHelper.GetLivesRefreshTime(); MaxLives = RemoteConfigHelper.GetMaxLives(); }
private void CheckForCompletion(Colour PieceColour, int previous, int collected) { int increment = RemoteConfigHelper.GetCollectionInterval(PieceColour); var multiplier = (previous / increment) + 1; int powerupsEarned = NumberOfPowerupsEarned(previous, previous + collected, increment); for (int i = 0; i < powerupsEarned; i++) { PieceCollectionComplete?.Invoke(PieceColour); AddNewPowerup(PowerupFactory.GetPowerup(PieceColour)); } }