示例#1
0
 public void StartDrag()
 {
     if (Phases.CurrentPhase.GetType() == typeof(MainPhases.SetupPhase))
     {
         StartingZone         = BoardManager.GetStartingZone(Phases.CurrentSubPhase.RequiredPlayer);
         isInsideStartingZone = false;
         Roster.SetRaycastTargets(false);
         Roster.AllShipsHighlightOff();
         BoardManager.HighlightStartingZones();
         inReposition = true;
     }
 }
示例#2
0
        public override void Initialize()
        {
            UI.HideContextMenu();

            Selection.ThisShip.IsManeuverPerformed = true;
            Roster.AllShipsHighlightOff();

            Selection.ThisShip.ObstaclesHit = new List <GenericObstacle>();
            Selection.ThisShip.MinesHit     = new List <GameObject>();

            CheckAssignedManeuver();
        }
 private void HighlightShips()
 {
     Roster.AllShipsHighlightOff();
     foreach (var ship in Roster.GetPlayer(RequiredPlayer).Ships)
     {
         if ((ship.Value.PilotSkill == RequiredPilotSkill) && (!ship.Value.IsManeuverPerformed))
         {
             ship.Value.HighlightCanBeSelectedOn();
             Roster.RosterPanelHighlightOn(ship.Value);
         }
     }
 }
示例#4
0
    private static void InitializeAttack()
    {
        Roster.AllShipsHighlightOff();

        AttackStep = CombatStep.Attack;
        CallAttackStartEvents();
        Selection.ActiveShip = Attacker;
        if (SecondaryWeapon != null)
        {
            SecondaryWeapon.PayAttackCost();
        }
    }
示例#5
0
    private static void InitializeAttack(Action callBack)
    {
        Roster.AllShipsHighlightOff();

        AttackStep = CombatStep.Attack;
        CallAttackStartEvents();
        Selection.ActiveShip = Attacker;
        Triggers.ResolveTriggers(TriggerTypes.OnAttackStart, delegate
        {
            ChosenWeapon.PayAttackCost(callBack);
        });
    }
示例#6
0
        public override void Initialize()
        {
            UI.HideContextMenu();

            Selection.ThisShip.IsManeuverPerformed = true;
            Roster.AllShipsHighlightOff();

            Selection.ThisShip.ObstaclesHit = new List <Collider>();
            Selection.ThisShip.MinesHit     = new List <GameObject>();

            Selection.ThisShip.CallManeuverIsReadyToBeRevealed(RevealManeuver);
        }
示例#7
0
 public void StartDrag()
 {
     if (Phases.CurrentPhase.GetType() == typeof(MainPhases.SetupPhase))
     {
         StartingZone         = BoardManager.GetStartingZone(Phases.CurrentSubPhase.RequiredPlayer);
         isInsideStartingZone = false;
         Roster.SetRaycastTargets(false);
         Roster.AllShipsHighlightOff();
         BoardManager.HighlightStartingZones();
         Selection.ThisShip.Model.GetComponentInChildren <ObstaclesStayDetector>().checkCollisions = true;
         inReposition = true;
     }
 }
示例#8
0
 public void ClickNextPhase()
 {
     HideNextButton();
     Roster.AllShipsHighlightOff();
     if (Phases.CurrentSubPhase.GetType() == typeof(SubPhases.CombatSubPhase))
     {
         foreach (var shipHolder in Roster.GetPlayer(Phases.CurrentPhasePlayer).Ships)
         {
             if (shipHolder.Value.PilotSkill == Phases.CurrentSubPhase.RequiredPilotSkill)
             {
                 shipHolder.Value.IsAttackPerformed = true;
             }
         }
     }
     Phases.CallNextSubPhase();
 }
示例#9
0
        public void StartDrag()
        {
            Roster.SetRaycastTargets(false);
            Roster.AllShipsHighlightOff();
            inReposition = true;

            if (CameraScript.InputTouchIsEnabled)
            {
                // Setup touch handler
                touchObjectPlacementHandler.SetShip(Selection.ThisShip);

                // With touch controls, wait for confirmation before setting the position
                UI.ShowNextButton();
            }

            IsReadyForCommands = true;
        }
示例#10
0
    // CHECK LEGALITY OF ATTACK

    public static void TryPerformAttack()
    {
        UI.HideContextMenu();
        MovementTemplates.ReturnRangeRuler();

        if (IsTargetLegalForAttack())
        {
            UI.HideSkipButton();
            Roster.AllShipsHighlightOff();

            DeclareAttackerAndDefender();

            CheckFireLineCollisions();
        }
        else
        {
            Roster.GetPlayer(Phases.CurrentPhasePlayer).OnTargetNotLegalForAttack();
        }
    }
示例#11
0
        public void StartDrag()
        {
            StartingZone         = Board.GetStartingZone(Phases.CurrentSubPhase.RequiredPlayer);
            isInsideStartingZone = false;
            Roster.SetRaycastTargets(false);
            Roster.AllShipsHighlightOff();
            Board.HighlightStartingZones(Phases.CurrentSubPhase.RequiredPlayer);
            Selection.ThisShip.Model.GetComponentInChildren <ObstaclesStayDetector>().checkCollisions = true;
            inReposition = true;

            if (CameraScript.InputTouchIsEnabled)
            {
                // Setup touch handler
                touchObjectPlacementHandler.SetShip(Selection.ThisShip);

                // With touch controls, wait for confirmation before setting the position
                UI.ShowNextButton();
                IsReadyForCommands = true;
            }
        }
示例#12
0
    // CHECK LEGALITY OF ATTACK

    public static void TryPerformAttack(bool isSilent)
    {
        UI.HideContextMenu();
        MovementTemplates.ReturnRangeRuler();

        if (IsTargetLegalForAttack(Selection.AnotherShip, ChosenWeapon, isSilent))
        {
            UI.HideSkipButton();
            Roster.AllShipsHighlightOff();

            DeclareAttackerAndDefender();

            CheckFireLineCollisions();
        }
        else
        {
            IsAttackAlreadyCalled = false;
            Roster.GetPlayer(Phases.CurrentPhasePlayer).OnTargetNotLegalForAttack();
        }
    }
示例#13
0
 public override void Next()
 {
     Roster.AllShipsHighlightOff();
     Phases.CurrentSubPhase = Phases.CurrentSubPhase.PreviousSubPhase;
     UpdateHelpInfo();
 }
示例#14
0
 public override void Initialize()
 {
     Roster.AllShipsHighlightOff();
     PlayerAssignsManeuvers();
 }