Exemplo n.º 1
0
    public override void Load(Stream fs)
    {
        currentStep = (FoundationScenarioStep)fs.ReadByte();
        if (currentStep >= FoundationScenarioStep.AnchorBuilding)
        {
            AssignAnchor(colony.GetBuilding(Structure.ANCHOR_BASEMENT_ID) as AnchorBasement);
        }
        //
        if (fs.ReadByte() == 1)
        {
            if (hexBuilder == null)
            {
                SetHexBuilder();
            }
            hexBuilder.Load(fs);
        }
        //
        int x = fs.ReadByte();

        if (x != 0)
        {
            FoundationScenarioStep fss = (FoundationScenarioStep)fs.ReadByte();
            subscenario = FDR_Subscenario.GetSubscenario(fss, this);
            if (subscenario != null)
            {
                subscenario.StartScenario();
                subscenario.Load(fs);
            }
        }
        //
        if (fs.ReadByte() == 1)
        {
            PrepareSettling();
        }
    }
    private void StartSubscenario()
    {
        switch (currentStep)
        {
        case FoundationScenarioStep.Begin:
            subscenario = new FDR_Begin(this);
            break;

        case FoundationScenarioStep.AnchorBuilding:
            subscenario = new FDR_AnchorBuilding(this);
            break;

        case FoundationScenarioStep.AnchorStart:
            subscenario = new FDR_AnchorStart(this);
            break;

        case FoundationScenarioStep.InnerRingBuilding:
            subscenario = new FDR_InnerRingBuilding(this);
            break;

        case FoundationScenarioStep.PierPreparing:
            subscenario = new FDR_PierPreparing(this);
            break;

        case FoundationScenarioStep.OuterRingBuilding:
            subscenario = new FDR_OuterRingBuilding(this);
            break;

        default:
            Debug.Log("no subscenario found");
            return;
        }
        subscenario.StartScenario();
    }
Exemplo n.º 3
0
    private void StartQuest(FDR_Subscenario s)
    {
        var sq = new ScenarioQuest(s, QuestIcon.FoundationRouteIcon);

        questUI.SYSTEM_NewScenarioQuest(sq);
        scenarioQuest = sq;
        scenarioQuest.FillText(localizer.GetQuestData(s.GetScenarioStep()));
    }
Exemplo n.º 4
0
 private void StartSubscenario()
 {
     subscenario = FDR_Subscenario.GetSubscenario(currentStep, this);
     subscenario?.StartScenario();
 }