private void Awake() { #region no duplicates if (PWR == null) { PWR = this; } else if (PWR != this) { Destroy(gameObject); } #endregion }
public void EnemyPowerRating(float PWR) { // Multiply the power depending on what tag enemy is. float enemyBasePowerRating = 25; PWR = enemyBasePowerRating; PWR += EnemyStatsManager.statRef.powerScore; if (gameObject.tag == "Light") { currentLightEnemyPwrscore = PWR; } else if (gameObject.tag == "Medium") { currentMediumEnemyPwrscore = PWR; } else if (gameObject.tag == "Heavy") { currentHeavyEnemyPwrscore = PWR; } }