Exemplo n.º 1
0
    public void StartNewGame()
    {
        modpanel.ApplyChanges();


        SavedFile state = new SaveStateWorldMap(curretnCampaign);


        FilePath.CurrentSaveFilePath = SaveLoadManager.AutoSaveCampaignProgress(state);
        Globals.campaign             = curretnCampaign;


        if (curretnCampaign.initalCutscene != "")
        {
            Globals.cutsceneData = new CutsceneData(curretnCampaign.GetCutsceneCopy(curretnCampaign.initalCutscene), state, true);
            CustomeSceneLoader.LoadCutsceneScene();
        }
        else if (curretnCampaign.initalCombat != "")
        {
            state = new SavedFileMission(curretnCampaign, curretnCampaign.GetMissionData(curretnCampaign.initalCombat));
            FilePath.CurrentSaveFilePath = SaveLoadManager.AutoSaveCampaignProgress(state);

            state.SwitchScene();
        }
        else
        {
            state.SwitchScene();
        }
    }
Exemplo n.º 2
0
    public void SaveGame(string slotNumb)
    {
        SavedFile f = null;


        if (slotType == SlotButtonType.SaveWorld)
        {
            f = new SaveStateWorldMap(Globals.campaign);
        }
        else if (slotType == SlotButtonType.SaveBattle)
        {
            f = Globals.GetBoardManager().SaveMission();
        }
        else
        {
            f = (SavedFile)SaveLoadManager.LoadFile(

                slotNumb

                );

            Globals.campaign             = f.campaign;
            FilePath.CurrentSaveFilePath = slotNumb;
            f.SwitchScene();
            return;
        }

        SaveLoadManager.SaveCampaignProgress(f, slotNumb);
        ;
    }
Exemplo n.º 3
0
    private void WatchCutscene()
    {
        SaveStateWorldMap wm_state = new SaveStateWorldMap(Globals.campaign);

        Globals.cutsceneData = new CutsceneData(currCutscene, wm_state, false);


        CustomeSceneLoader.LoadCutsceneScene();
    }
Exemplo n.º 4
0
    void MissionComplete()
    {
        pathfinding.RemoveAllActorStats();

        foreach (Actor actor in spawner.actors)
        {
            actor.RemoveAllBuffs();
            actor.actorData.ResetCharges();
        }

        int i = 0;

        foreach (ActorData m in currentMission.npcs)
        {
            i++;
        }


        currentMission.mainReward.AddReward(new ExperienceReward(i * 1000));
        Debug.Log(i + " enemies killed");


        Globals.campaign.MissionCompleted(currentMission.GetKey());


        Debug.Log("MISSION COMPLETE");
        currentMission.MissionComplete(this);


        //
        inputFSM.SwitchState(new RewardState(this));


        foreach (ActorData ad in party.partyCharacter)
        {
            ad.selected = false;
            ad.RestoreCurrentStats();
        }

        if (campaign.campaignModifier.permaDeath == false)
        {
            foreach (ActorData actorData in party.partyCharacter)
            {
                if (actorData.selected && actorData.isAlive == false)
                {
                    actorData.isAlive = true;
                }
            }
        }


        SavedFile state = new SaveStateWorldMap(Globals.campaign);

        SaveLoadManager.AutoSaveCampaignProgress(state);

        ui.rewardPanel.InitRewardList(this);
    }