public void OnUpdate() { if (checkAndUpdateCooldown()) { PowerHandler.getInstance().StartSurge(this.coords, 100); PollutionHandler.getInstance().pollute(polutionGenerated); } }
// Use this for initialization void Start() { trans = GetComponent <Transform> (); spriteRenderer = GetComponent <SpriteRenderer> (); pollutionHandler = PollutionHandler.getInstance(); map = TiledMap.getInstance(); intensity = baseIntensity + pollutionHandler.pollution * pollutionModifier * Random.Range(minFactor, maxFactor); Debug.Log("NEW TORNADO! Intensity: " + intensity); }