Example #1
0
        private void DropSparePartsToken()
        {
            Action Callback = Phases.CurrentSubPhase.CallBack;

            DecisionSubPhase.ConfirmDecisionNoCallback();

            HostUpgrade.State.SpendCharge();

            Debris spareParts = new Debris("Spare Parts", "spareparts");

            spareParts.Spawn("Spare Parts " + HostShip.ShipId, Board.GetBoard());
            ObstaclesManager.AddObstacle(spareParts);

            spareParts.ObstacleGO.transform.position    = HostShip.GetBack();
            spareParts.ObstacleGO.transform.eulerAngles = HostShip.GetAngles() + new Vector3(0, 180, 0);
            spareParts.IsPlaced = true;

            GameManagerScript.Wait(
                1,
                delegate
            {
                Messages.ShowInfo("Spare Parts are dropped");
                BreakAllLocksRecursive(Callback);
            }
                );
        }