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); }
// Use this for initialization void Start() { TowerData.Level tower = GameData.instance.GetTower(type, level); splashArea = tower.GetSpecialProperty(GameData.GameProperies.EFFECT); this.GetComponent <SphereCollider> ().radius = (float)splashArea; }