public GameStateProviderTests() { _dummyPlayer = GetDummyPlayer(); _dummyMap = GetDummyMap(); _gameStateRepository = Substitute.For <IGameStateRepository>(); _playersProvider = Substitute.For <IPlayersProvider>(); _playersProvider.Get(Guid.Empty).ReturnsForAnyArgs(_dummyPlayer); _mapProvider = Substitute.For <IMapProvider>(); _mapProvider.GetRandomMap().ReturnsForAnyArgs(_dummyMap); _gameStateProvider = new GameStateProvider(_gameStateRepository, _playersProvider, _mapProvider); }
IEnumerator Start() { yield return(PlayerCloneState.LoadAssets()); //Load our player clone state assets in //Spawn our player CharacterController playerController = Instantiate(playerPrefab).GetComponent <CharacterController>(); //Setup player Debug.Assert(playerController != null, "Our player prefab does not have a character controller!"); player.Possess(playerController); player.enabled = true; RespawnPlayer(); //Setup camera mainCamera.Follow = playerController.transform; //Set gamestate currentGameState = GameStateProvider.GetCurrentGameState(); }
public MyCustomReplay(ChecksumProvider checksumProvider, GameStateProvider gameStateProvider) : base(checksumProvider) { _gameStateProvider = gameStateProvider; }
public GameStateChecksumProvider(GameStateProvider gameStateProvider) { _gameStateProvider = gameStateProvider; }
private void RoomCompleted() { OnDoorOpen.Invoke(currentDoorIndex++); currentGameState = GameStateProvider.GetCurrentGameState(); //Store the new current gamestate }