コード例 #1
0
ファイル: Attack.cs プロジェクト: ronaldme/Triumph
 private void Awake()
 {
     movement  = GameObjectReferences.GetScriptsGameObject().GetComponent <Movement>();
     highlight = GameObjectReferences.GetScriptsGameObject().GetComponent <Highlight>();
     EventHandler.register <OnHighlightClick>(BattlePreparation);
     EventHandler.register <OnAnimFight>(BattleSimulation);
 }
コード例 #2
0
ファイル: Movement.cs プロジェクト: ronaldme/Triumph
 private void Start()
 {
     levelManager    = GameObjectReferences.GetGlobalScriptsGameObject().GetComponent <LevelManager>();
     highlight       = GameObjectReferences.GetScriptsGameObject().GetComponent <Highlight>();
     attack          = GameObjectReferences.GetScriptsGameObject().GetComponent <Attack>();
     dayStateControl = GameObjectReferences.GetScriptsGameObject().GetComponent <DayStateController>();
 }
コード例 #3
0
ファイル: Highlight.cs プロジェクト: ronaldme/Triumph
        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);
        }
コード例 #4
0
        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);
        }