示例#1
0
        public void CancelInterdictedUnit()
        {
            GlobalDefinitions.WriteToCommandFile(GlobalDefinitions.CANCELUNITINTERDICTIONKEYWORD + " " + name);

            for (int index = 0; index < GlobalDefinitions.interdictedUnits.Count; index++)
            {
                if (GlobalDefinitions.interdictedUnits[index] == unit)
                {
                    GlobalDefinitions.interdictedUnits[index].GetComponent <UnitDatabaseFields>().unitInterdiction = false;
                    GlobalDefinitions.interdictedUnits.Remove(unit);
                }
            }
            GlobalDefinitions.tacticalAirMissionsThisTurn--;
            GUIRoutines.RemoveGUI(GlobalDefinitions.tacticalAirGUIInstance);
            CombatResolutionRoutines.CreateTacticalAirGUI();
        }
示例#2
0
        public void CancelCloseDefense()
        {
            GlobalDefinitions.WriteToCommandFile(GlobalDefinitions.CANCELCLOSEDEFENSEKEYWORD + " " + name);

            for (int index = 0; index < GlobalDefinitions.closeDefenseHexes.Count; index++)
            {
                if (GlobalDefinitions.closeDefenseHexes[index] == hex)
                {
                    GlobalDefinitions.closeDefenseHexes[index].GetComponent <HexDatabaseFields>().closeDefenseSupport = false;
                    GlobalDefinitions.UnhighlightHex(GlobalDefinitions.closeDefenseHexes[index]);
                    GlobalDefinitions.closeDefenseHexes.Remove(hex);
                }
            }
            GlobalDefinitions.tacticalAirMissionsThisTurn--;
            GUIRoutines.RemoveGUI(GlobalDefinitions.tacticalAirGUIInstance);
            CombatResolutionRoutines.CreateTacticalAirGUI();
        }
示例#3
0
        public void CancelRiverInterdiction()
        {
            GlobalDefinitions.WriteToCommandFile(GlobalDefinitions.CANCELRIVERINTERDICTIONKEYWORD + " " + name);

            for (int index = 0; index < GlobalDefinitions.riverInderdictedHexes.Count; index++)
            {
                if (GlobalDefinitions.riverInderdictedHexes[index] == hex)
                {
                    GlobalDefinitions.riverInderdictedHexes[index].GetComponent <HexDatabaseFields>().riverInterdiction = false;
                    GlobalDefinitions.UnhighlightHex(GlobalDefinitions.riverInderdictedHexes[index]);
                    GlobalDefinitions.riverInderdictedHexes.Remove(hex);
                }
            }
            GlobalDefinitions.tacticalAirMissionsThisTurn--;
            GUIRoutines.RemoveGUI(GlobalDefinitions.tacticalAirGUIInstance);
            CombatResolutionRoutines.CreateTacticalAirGUI();
        }