public void LeftClick() { switch (GameController.CurrentlySelectedStichija) { case Stichija.Audra: pollution.ReducePollution(); RightClick(); break; case Stichija.Kometos: pollution.IncreasePollution(); RightClick(); break; case Stichija.Viesulas: pollution.IncreasePollution(); RightClick(); break; case Stichija.Zaibas: pollution.IncreasePollution(); RightClick(); break; default: break; } DeselectAllStichijos.Raise(); }
private void LeftClick(bool isTreeCut) { switch (GameController.CurrentlySelectedStichija) { case Stichija.Audra: if (isTreeCut) { pollution.ReducePollution(); spotController.trees.GetComponent <Animator>().SetTrigger("Grow"); spotController.ShrunkTrees = false; } break; case Stichija.Kometos: pollution.IncreasePollution(); RightClick(); break; case Stichija.Viesulas: pollution.IncreasePollution(); RightClick(); break; case Stichija.Zaibas: pollution.IncreasePollution(); RightClick(); break; default: break; } }
public void DisableTrees() { if (CurrentlyEnabled == trees) { trees.GetComponent <Animator>().SetTrigger("Shrink"); pollutionReference.IncreasePollution(); ShrunkTrees = true; } }
void cutDownTrees() { if (getEmptySpots().Count <= destroyTreesWhen) { timeBeforeNextTreeCut -= Time.deltaTime; } List <SpotController> treesEnabled = getPopulatedGoodSpots(); if (timeBeforeNextTreeCut <= 0f && treesEnabled.Count > 0) { SpotController randomTreeSpot = treesEnabled[Random.Range(0, treesEnabled.Count)]; randomTreeSpot.trees.GetComponent <Animator>().SetTrigger("Shrink"); randomTreeSpot.ShrunkTrees = true; pollution.IncreasePollution(); ResetTreeCutCounter(); } }