private void ChanceToGetBooster(BoostersController.BoosterTypes booster) { randVal = Random.value * 100; if (randVal < BoostersController.chanceOnBooster + AwakeningUpgradeSingleton.chanceOnBooster) { BoostersController.GetBooster(booster); } }
void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this.gameObject); return; } Booster booster; boosterType2Booster = new Dictionary <BoosterType, Booster>(); booster = BoosterFactory.getBooster(BoosterType.Food); boosterType2Booster.Add(booster.BoosterType, booster); booster = BoosterFactory.getBooster(BoosterType.Petting); boosterType2Booster.Add(booster.BoosterType, booster); booster = BoosterFactory.getBooster(BoosterType.AnimalVaccine); boosterType2Booster.Add(booster.BoosterType, booster); }