Exemple #1
0
        public void Save()
        {
            UIMemento.Originator UIOrig = new UIMemento.Originator();
            UIOrig.SetState(GameUI);
            UIMemento.Caretaker.SaveState(UIOrig);

            PlayerMemento.Originator PlayerOrig = new PlayerMemento.Originator();
            PlayerOrig.SetState(player);
            PlayerMemento.Caretaker.SaveState(PlayerOrig);
        }
Exemple #2
0
        public void Load()
        {
            UIMemento.Originator UIOrig = new UIMemento.Originator();
            UIMemento.Caretaker.RestoreState(UIOrig);
            GameUI = UIOrig.GetState();

            PlayerMemento.Originator PlayerOrig = new PlayerMemento.Originator();
            PlayerMemento.Caretaker.RestoreState(PlayerOrig);
            player = PlayerOrig.GetState();

            GameUI.SetResolution();
            GameUI.SetStyle();
            CurrentMenu = StartMenuDrawer.LabMenu;
        }
Exemple #3
0
 public static void RestoreState(Originator orig)
 {
     orig.SetMemento(save);
 }
Exemple #4
0
 public static void SaveState(Originator orig)
 {
     save = orig.CreateMemento();
 }