Пример #1
0
 public void LoadBeat(ProgressSystem progress)
 {
     foreach (var point in Points)
     {
         progress.AddPoint(point.ProgressName, point);
     }
 }
Пример #2
0
    public void HardReset()
    {
        PlayerName = "";

        Day      = 0;
        Progress = new ProgressSystem();
    }
Пример #3
0
    public ProgressSystem(ProgressSystem copy_)
    {
        ProgressBook = new Dictionary <string, ProgressPoint>();
        PlotLines    = new List <Beat>();



        for (int ima = 0; ima < copy_.PlotLines.Count; ++ima)
        {
            PlotLines.Add(new Beat(copy_.PlotLines[ima], this));
        }

        Objectives = new List <Task>();
        ChronologicalObjectives = new List <Task>();



        for (int ima = 0; ima < copy_.Objectives.Count; ++ima)
        {
            Objectives.Add(new Task(copy_.Objectives[ima]));
        }

        for (int ima = 0; ima < copy_.ChronologicalObjectives.Count; ++ima)
        {
            ChronologicalObjectives.Add(Objectives[copy_.ChronologicalObjectives[ima].Number]);
        }


        UpdatePlotLines();
    }
Пример #4
0
 private void HandleStartGameEvent(GameStartEventInfo gameStartEventInfo)
 {
     LocationSystem.Start();
     DialogueSystem.Start();
     EntitySystem.Start();
     ProgressSystem.Start();
     loadingScreen.SetActive(false);
     StartGame(gameStartEventInfo.progress);
 }
Пример #5
0
    public Beat(Beat copy, ProgressSystem progress)
    {
        Points = new List <ProgressPoint>();

        for (int i = 0; i < copy.Points.Count; ++i)
        {
            ProgressPoint point = new ProgressPoint(copy.Points[i]);

            Points.Add(point);
            progress.AddPoint(point.ProgressName, point);
        }
    }
Пример #6
0
    public Game()
    {
        Day         = 0;
        Hour        = 0;
        PlayerName  = "Sam";
        CurrentRoom = Room.YourRoom;
        Progress    = new ProgressSystem();
        Self        = new Personality();
        Memory      = new GallerySystem();

        Progress.SetValue("MasterVolume", 1.0f);
        Progress.SetValue("BackgroundVolume", 1.0f);
        Progress.SetValue("SFXVolume", 1.0f);
        Progress.SetValue("TextSpeed", 1.0f);
        Progress.SetValue("week", 1);
        Progress.SetValue("Depression Time Dilation", true);

        Schedule  = new List <CharacterSchedule>();
        SceneList = new Dictionary <string, TimeStamp>();
        CastCall  = new List <CharacterIntermission>();
        ScenePath = new Dictionary <string, string>();

        var schedulefiller = TextParser.ToJson("Characters");

        foreach (JsonData character in schedulefiller)
        {
            var Aday = new List <DaySchedule>();

            for (int i = 0; i <= 7; ++i)
            {
                var hours = new DaySchedule();
                //var seen = new List<bool>();
                for (int j = 0; j < 24; ++j)
                {
                    var lol = (Room)(int)character["Schedule"][i][j];
                    hours.Schedule.Add(lol);
                    //seen.Add(false);
                }

                Aday.Add(hours);
            }

            Schedule.Add(new CharacterSchedule((string)character["Name"], Aday));
        }
    }
Пример #7
0
    //main game constructor
    public Beat(JsonData beatData, ProgressSystem progress)
    {
        PlotName   = (string)beatData["PlotName"];
        BeatName   = (string)beatData["BeatName"];
        BeatNumber = (int)beatData["BeatNumber"];

        Points = new List <ProgressPoint>();

        for (int i = 0; i < beatData["Point"].Count; ++i)
        {
            string        boolName = (string)beatData["Point"][i]["Name"];
            PointTypes    type     = (PointTypes)(int)beatData["Point"][i]["Type"];
            ProgressPoint point    = new ProgressPoint(boolName, type);

            Points.Add(point);
            progress.AddPoint(boolName, point);
        }
    }
Пример #8
0
    public Game(Game copy_)
    {
        Day        = copy_.Day;
        Hour       = copy_.Hour;
        PlayerName = copy_.PlayerName;

        Progress = new ProgressSystem(copy_.Progress);
        Self     = new Personality(copy_.Self);
        Memory   = new GallerySystem(copy_.Memory);

        Schedule  = new List <CharacterSchedule>();
        SceneList = new Dictionary <string, TimeStamp>();
        CastCall  = new List <CharacterIntermission>();
        ScenePath = new Dictionary <string, string>();

        foreach (CharacterSchedule character in copy_.Schedule)
        {
            var Aday = new List <DaySchedule>();

            for (int i = 0; i <= 7; ++i)
            {
                var hours = new DaySchedule();
                for (int j = 0; j < 24; ++j)
                {
                    var lol = character.Day[i].Schedule[j];
                    hours.Schedule.Add(lol);
                }

                Aday.Add(hours);
            }

            Schedule.Add(new CharacterSchedule(character.name, Aday));
        }

        foreach (string scene in copy_.SceneList.Keys)
        {
            SceneList.Add(scene, new TimeStamp(copy_.SceneList[scene]));
        }

        for (int i = 0; i < copy_.CastCall.Count; ++i)
        {
            CastCall.Add(new CharacterIntermission(copy_.CastCall[i]));
        }

        foreach (string scene in copy_.ScenePath.Keys)
        {
            ScenePath.Add(scene, (copy_.ScenePath[scene]));
        }


        StorySave.Overwrite(copy_.StorySave);

        CurrentRoom      = copy_.CurrentRoom;
        CurrentTimeBlock = copy_.CurrentTimeBlock;
        DrainEnergy      = copy_.DrainEnergy;
        InCurrentStory   = copy_.InCurrentStory;
        CurrentStory     = copy_.CurrentStory;
        CurrentNode      = copy_.CurrentNode;
        CurrentBackdrop  = copy_.CurrentBackdrop;
        CurrentCG        = copy_.CurrentCG;

        CGCalls = new List <string>();
        for (int i = 0; i < copy_.CGCalls.Count; ++i)
        {
            CGCalls.Add(copy_.CGCalls[i]);
        }

        SavedInk        = copy_.SavedInk;
        CurrentTrack    = copy_.CurrentTrack;
        CurrentAmbience = copy_.CurrentAmbience;

        CurrentHistory = copy_.CurrentHistory;
        CurrentSpeaker = copy_.CurrentSpeaker;

        SaveStamp = copy_.SaveStamp;
    }