public static void PlaceShip(GenericShip ship, Vector3 position, Vector3 angles, Action callback) { TurnOffStartingZones(); ship.SetPosition(position); ship.SetAngles(angles); ship.IsSetupPerformed = true; ship.CallOnShipIsPlaced(callback); }
public void ConfirmShipSetup(int shipId, Vector3 position, Vector3 angles) { Roster.SetRaycastTargets(true); //Temporary GameManagerScript Game = GameObject.Find("GameManager").GetComponent <GameManagerScript>(); Game.Position.inReposition = false; Selection.ChangeActiveShip("ShipId:" + shipId); Selection.ThisShip.SetPosition(position); Selection.ThisShip.SetAngles(angles); Selection.ThisShip.IsSetupPerformed = true; Board.BoardManager.TurnOffStartingZones(); GenericShip lastShip = Selection.ThisShip; Selection.DeselectThisShip(); lastShip.CallOnShipIsPlaced(Phases.Next); }