예제 #1
0
        public float GetProperty(GameData.GameProperies property)
        {
            switch (property)
            {
            case GameData.GameProperies.DAMAGE_PERCENTAGE:
                return(damagePercentage);

            case GameData.GameProperies.DAMAGE:
                return(damage);

            case GameData.GameProperies.DURATION:
                return(duration);

            case GameData.GameProperies.RANGE:
                return(range);

            case GameData.GameProperies.REDUCTION:
                return(reduction);

            case GameData.GameProperies.PROJECTILES:
                return(projectiles);

            case GameData.GameProperies.CHANCE_PERCENTAGE:
                return(chancePercentage);
            }
            return(0);
        }
예제 #2
0
        public float GetProperty(GameData.GameProperies property)
        {
            switch (property)
            {
            case GameData.GameProperies.DAMAGE:
                return(damage);

            case GameData.GameProperies.HP:
                return(hp);

            case GameData.GameProperies.ARMOR:
                return(armor);

            case GameData.GameProperies.RANGE:
                return(range);

            case GameData.GameProperies.RATE_OF_FIRE:
                return(rateOfFire);

            case GameData.GameProperies.COST:
                return(cost);

            case GameData.GameProperies.EFFECT:
                return(effect);

            case GameData.GameProperies.REBOOT_TIME:
                return(rebootTime);
            }
            return(0);
        }
예제 #3
0
 public float GetSpecialProperty(GameData.GameProperies property)
 {
     if (specialAbility != null)
     {
         return(specialAbility.GetProperty(property));
     }
     return(0);
 }
예제 #4
0
 public float EvaluateSpecialAbility(GameData.GameProperies stat, bool force = false)
 {
     if (baseTower.specialAbility != null)
     {
         if (force || UnityEngine.Random.Range(0.0f, 1.0f) < baseTower.GetSpecialProperty(GameData.GameProperies.CHANCE_PERCENTAGE))
         {
             return(baseTower.GetSpecialProperty(stat));
         }
     }
     return(-1);
 }