Exemplo n.º 1
0
    /// <summary>
    /// Is called from MouseUp() and if all is good will get the way done
    /// </summary>
    public void DoneWayRoutine()
    {
        Trail h = Control.CurrentSpawnBuild as Trail;

        if (!h.PositionFixed && h.CurrentLoop == H.None)
        {
            h.DonePlace();
        }
        else if (!h.PositionFixed && h.CurrentLoop != H.None)
        {
            GameScene.ScreenPrint("Still building coop pls");
        }
        //print("doingnow H.trail cLoop:" + h.CurrentLoop + "PFix: " + h.PositionFixed);
        if (h.PositionFixed && h.CurrentLoop == H.Done)
        {
            //tgis need to be called here before the new bridge is creted
            if (h.HType.ToString().Contains("Bridge"))
            {
                Bridge b = Control.CurrentSpawnBuild as Bridge;
                b.CreatePartsRoutine();
            }

            _isDraggingWay = false;
            GameScene.ScreenPrint("new Way auto");
            BuildNowNew(DoingNow);
        }
    }