public float _getSignalSize(unitStats s) { float size = 0.5f; float distance_bonus = 0f; if (s.toy_id.toy_type == ToyType.Temporary) { distance_bonus = StaticRune.GetDistanceBonus(s.name, islands[island_selected].transform.position, null); } if (s.toy_id.rune_type == RuneType.SensibleCity) { return(0.5f); } if (s != null) { size = StaticRune.time_bonus_aff(StaticStat.getBaseFactor(s.toy_id.rune_type, EffectType.Range, s.toy_id.toy_type == ToyType.Hero), EffectType.Range, s.toy_id.rune_type, s.toy_id.toy_type, distance_bonus) / 2f; } // Debug.Log("Getting signal size for " + selected + " got " + size + "\n"); return(size); }
public string verify_toy_for_distance(string toy_name) { string return_me; if (Central.Instance.getToy(toy_name).required_building.Equals("") || StaticRune.GetDistanceBonus(toy_name, this.transform.position, null) > 0) { return_me = toy_name; } else { return_me = "TOOFAR"; } // Debug.Log("Checking distance for " + Central.Instance.getToy(toy_name).required_building + " : " + toy_name + " -> " + return_me + "\n"); return(return_me); }