public SpaceShipActionsReplay stopRecordingAndGetReplay() { SpaceShipActionsReplay theResult = _currentRecordingReplay; _currentRecordingReplay = null; return(theResult); }
public System.Collections.IEnumerator startSpawnClones() { List <SpaceShipActionsReplay> theCurrentIteratorClones = new List <SpaceShipActionsReplay>(_replayForClones); int theCurrentSpawnIndex = 0; while (theCurrentSpawnIndex < theCurrentIteratorClones.Count) { SpaceShipActionsReplay theReplay = theCurrentIteratorClones[theCurrentSpawnIndex]; if (null != theReplay) { var theCloneController = Instantiate(_clonePrefab); iterationController.activeClonesOnScene.Add(theCloneController.gameObject); theCloneController.transform.position = spawnController.positionSpawnClone; theCloneController.startReplayPlaying(theReplay); //performFirstSpawnedCloneTest(theCloneController, theCurrentSpawnIndex); } ++theCurrentSpawnIndex; yield return(new WaitForSeconds(_timeBetweenClonesSpawn)); } }
private SpaceShipActionsReplay destroyPlayerSavingReplay() { SpaceShipActionsReplay theReplay = _playerSpaceShip.stopRecordingAndGetReplay(); Destroy(_playerSpaceShip.gameObject); return(theReplay); }
public void processPlayerSpaceShipDeath(SpaceShipMovement inDeadSpaceShipMovement) { SpaceShipActionsReplay theReplayOfDeadPlayer = inDeadSpaceShipMovement.GetComponent <SpaceShipPlayerController>().stopRecordingAndGetReplay(); _replayForClones.Add(theReplayOfDeadPlayer); _gameplayManager.EndIteration(false); // inDeadSpaceShipMovement.gameObject.SetActive(false); }
private void spawnCloneThatPlaysReplay(SpaceShipActionsReplay inReplay) { if (null == inReplay) { var theCloneSpaceShip = Instantiate(_cloneSpaceShipPrefab); theCloneSpaceShip.transform.position = _startingPlayerSpaceShipPosition; theCloneSpaceShip.startReplayPlaying(inReplay); } }
public void startReplayPlaying(SpaceShipActionsReplay inReplay) { _playingStartTime = Time.fixedTime; _replay = inReplay; _replayEnumerator = inReplay.getEnumerator(); }
public void startNewRecording() { _currentRecordingReplay = new SpaceShipActionsReplay(); _recordingStartTime = Time.fixedTime; }
private void performTest() { SpaceShipActionsReplay theReplay = destroyPlayerSavingReplay(); spawnCloneThatPlaysReplay(theReplay); }