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; } }
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); } } }
private static void InitializeAttack() { Roster.AllShipsHighlightOff(); AttackStep = CombatStep.Attack; CallAttackStartEvents(); Selection.ActiveShip = Attacker; if (SecondaryWeapon != null) { SecondaryWeapon.PayAttackCost(); } }
private static void InitializeAttack(Action callBack) { Roster.AllShipsHighlightOff(); AttackStep = CombatStep.Attack; CallAttackStartEvents(); Selection.ActiveShip = Attacker; Triggers.ResolveTriggers(TriggerTypes.OnAttackStart, delegate { ChosenWeapon.PayAttackCost(callBack); }); }
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); }
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; } }
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(); }
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; }
// 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(); } }
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; } }
// 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(); } }
public override void Next() { Roster.AllShipsHighlightOff(); Phases.CurrentSubPhase = Phases.CurrentSubPhase.PreviousSubPhase; UpdateHelpInfo(); }
public override void Initialize() { Roster.AllShipsHighlightOff(); PlayerAssignsManeuvers(); }