Exemplo n.º 1
0
 private void Awake()
 {
     #region no duplicates
     if (PWR == null)
     {
         PWR = this;
     }
     else if (PWR != this)
     {
         Destroy(gameObject);
     }
     #endregion
 }
Exemplo n.º 2
0
    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;
        }
    }