protected Booster(int id, BoostTypes typeOfBoost, BoosterTypes boosterType, int damageBoost, int shieldBoost, int healthBoost, int boxRewardBoost) { Id = id; BoostType = typeOfBoost; Type = boosterType; DamageBoost = damageBoost; ShieldBoost = shieldBoost; HealthBoost = healthBoost; BoxRewardBoost = boxRewardBoost; }
public static void GetBooster(BoosterTypes boosterType) { var index = (int)boosterType; openAndCloseCore.Open(boosters[index].transform); boostersImage[index] = (boosters[index].GetComponent <Image>()); boostersImage[index].fillAmount = 1f; if (boosterType == BoosterTypes.speed) { animatorController.IncreaseAnimationSpeed(1.5f); } }
static BoosterTypes bt = BoosterTypes.Speed; //Booster type public static void OnPickup() { bt = (BoosterTypes)Random.Range(0, 2); switch (bt) { case BoosterTypes.Speed: SpeedBooster(); break; case BoosterTypes.SuperBreak: SuperBreakerBooster(); break; case BoosterTypes.Shield: ShieldBooster(); break; default: Debug.LogError(bt); break; } }