Esempio n. 1
0
        private async Task TickTock(object arg)
        {
            var e = new GameAreaEvent {
                TimelineMessage = $"The clock ticks. The time is now _{DateTime.Now}_"
            };

            logger.LogInformation("Sending event: {e}", e);
            await areaEventStream.OnNextAsync(e);
        }
Esempio n. 2
0
        public async Task <GameAreaState> PatchArea(GameAreaPatchRequest patchRequest)
        {
            logger.LogInformation("Patching area {}: {} -> {}", IdentityString, State, patchRequest);
            PatchStateIfNeeded(patchRequest.AreaPatchOperations);
            var e = new GameAreaEvent {
                TimelineMessage = patchRequest.TimelineMessage
            };
            await areaEventStream.OnNextAsync(e);

            return(State);
        }