private void Awake() { movement = GameObjectReferences.GetScriptsGameObject().GetComponent <Movement>(); highlight = GameObjectReferences.GetScriptsGameObject().GetComponent <Highlight>(); EventHandler.register <OnHighlightClick>(BattlePreparation); EventHandler.register <OnAnimFight>(BattleSimulation); }
private void Start() { levelManager = GameObjectReferences.GetGlobalScriptsGameObject().GetComponent <LevelManager>(); highlight = GameObjectReferences.GetScriptsGameObject().GetComponent <Highlight>(); attack = GameObjectReferences.GetScriptsGameObject().GetComponent <Attack>(); dayStateControl = GameObjectReferences.GetScriptsGameObject().GetComponent <DayStateController>(); }
private void Awake() { levelManager = GameObjectReferences.GetGlobalScriptsGameObject().GetComponent <LevelManager>(); movement = GameObjectReferences.GetScriptsGameObject().GetComponent <Movement>(); movement = GameObjectReferences.GetScriptsGameObject().GetComponent <Movement>(); attack = GameObjectReferences.GetScriptsGameObject().GetComponent <Attack>(); animInfo = GameObjectReferences.GetScriptsGameObject().GetComponent <AnimationInfo>(); IsHighlightOn = false; HighlightObjects = new List <HighlightObject>(); EventHandler.register <OnUnitClick>(ShowHighlight); EventHandler.register <OnHighlightClick>(ClickedOnHightLight); }
public void DestroyBuilding() { Tile.buildingGameObject = null; Tile = null; var levelmanager = GameObjectReferences.GetGlobalScriptsGameObject().GetComponent <LevelManager>(); levelmanager.CurrentLevel.Players[index].RemoveBuilding(BuildingGame); var capBuilding = GameObjectReferences.GetScriptsGameObject().GetComponent <CaptureBuildings>(); if (capBuilding.BuildingsBeingCaptured.Contains(BuildingGame)) { capBuilding.BuildingsBeingCaptured.Remove(BuildingGame); } Destroy(gameObject); }