Beispiel #1
0
        public override void SaveServiceState(GameStateMap stateMap)
        {
            base.SaveServiceState(stateMap);

            var gameState = new GameState {
                DefaultPrinterId = DefaultPrinterId ?? Configuration.DefaultPrinterId
            };

            stateMap.SetState(gameState);
        }
Beispiel #2
0
        public override void SaveServiceState(GameStateMap stateMap)
        {
            base.SaveServiceState(stateMap);

            var gameState = new GameState {
                CharIdToAvatarPathMap = new SerializableLiteralStringMap(charIdToAvatarPathMap)
            };

            stateMap.SetState(gameState);
        }
Beispiel #3
0
        public override async Task SaveServiceStateAsync(GameStateMap stateMap)
        {
            await base.SaveServiceStateAsync(stateMap);

            var gameState = new GameState()
            {
                CharIdToAvatarPathMap = new SerializableLiteralStringMap(charIdToAvatarPathMap)
            };

            stateMap.SetState(gameState);
        }
        public override async Task SaveServiceStateAsync(GameStateMap stateMap)
        {
            await base.SaveServiceStateAsync(stateMap);

            var gameState = new GameState()
            {
                DefaultPrinterId = DefaultPrinterId ?? Configuration.DefaultPrinterId
            };

            stateMap.SetState(gameState);
        }
Beispiel #5
0
        public virtual void SaveServiceState(GameStateMap stateMap)
        {
            var state = new GameState();

            foreach (var kv in ManagedActors)
            {
                var actorState = new TState();
                actorState.OverwriteFromActor(kv.Value);
                state.ActorsMap.Add(kv.Key, actorState);
            }
            stateMap.SetState(state);
        }
        public void SaveServiceState(GameStateMap stateMap)
        {
            var gameState = new GameState()
            {
                Playing          = Playing,
                WaitingForInput  = WaitingForInput,
                GosubReturnSpots = GosubReturnSpots.Count > 0 ? GosubReturnSpots.Reverse().ToList() : null // Stack is reversed on enum.
            };

            stateMap.PlaybackSpot = PlaybackSpot;
            stateMap.SetState(gameState);
        }
Beispiel #7
0
        public virtual Task SaveServiceStateAsync(GameStateMap stateMap)
        {
            var state = new GameState();

            foreach (var kv in ManagedActors)
            {
                var actorState = new TState();
                actorState.OverwriteFromActor(kv.Value);
                state.ActorState.Add(actorState);
            }
            stateMap.SetState(state);
            return(Task.CompletedTask);
        }
Beispiel #8
0
        public Task SaveServiceStateAsync(GameStateMap stateMap)
        {
            var gameState = new GameState()
            {
                PlayedScriptName     = PlayedScript?.Name,
                PlayedIndex          = PlayedIndex,
                IsWaitingForInput    = IsWaitingForInput,
                LastGosubReturnSpots = LastGosubReturnSpots.Count > 0 ? LastGosubReturnSpots.Reverse().ToList() : null // Stack is reversed on enum.
            };

            stateMap.PlaybackSpot = PlaybackSpot;
            stateMap.SetState(gameState);
            return(Task.CompletedTask);
        }