public void AfterTest() { _heldItem = null; _character = null; GameInstance.ClearGameInstance(); }
public void BeforeTest() { _trigger = new GameObject().AddComponent <TestSaveProgressTriggerComponent>(); var characterObject = new GameObject(); characterObject.AddComponent <MockActionStateMachineComponent>(); characterObject.AddComponent <MockInputBinderComponent>(); characterObject.AddComponent <TestUnityMessageEventDispatcherComponent>().TestAwake(); _character = characterObject.AddComponent <TestCharacterComponent>(); _entity = new GameObject().AddComponent <MockPersistentEntityComponent>(); _entityKey = "Whatever"; _service = new MockPersistenceService { GetEntitiesResult = new Dictionary <string, IPersistentEntityInterface> { { _entityKey, _entity } } }; new GameObject().AddComponent <TestGameServiceProvider>().TestAwake(); GameServiceProvider.CurrentInstance.AddService <IPersistenceServiceInterface>(_service); }
public void AfterTest() { GameServiceProvider.ClearGameServiceProvider(); _interest = null; _point = null; _character = null; }
public void AfterTest() { GameInstance.ClearGameInstance(); _controllerAudio = null; _music = null; _character = null; _stateMachine = null; }
public void AfterTest() { GameServiceProvider.ClearGameServiceProvider(); _service = null; _entity = null; _character = null; _trigger = null; }
public void AfterTest() { _actionState = null; _originalCamera = null; _controller = null; _character = null; _health = null; _inputBinder = null; _actionStateMachine = null; _inCamera = null; }
public void BeforeTest() { var instance = new GameObject().AddComponent <MockInputComponent>(); instance.gameObject.AddComponent <TestGameInstance>().TestAwake(); var prefabObject = new GameObject(); prefabObject.AddComponent <MockActionStateMachineComponent>(); prefabObject.AddComponent <MockInputBinderComponent>(); _character = prefabObject.AddComponent <TestCharacterComponent>(); _character.TestStart(); _heldItem = _character.gameObject.AddComponent <MockHeldItemComponent>(); }
public void BeforeTest() { var gameObject = new GameObject(); gameObject.AddComponent <MockInputBinderComponent>(); gameObject.AddComponent <MockActionStateMachineComponent>(); _character = gameObject.AddComponent <TestCharacterComponent>(); _point = new GameObject().AddComponent <TestPointOfInterestComponent>(); _point.PointOfInterestEventKey = "Test Key"; _interest = new MockEventsOfInterestService(); new GameObject().AddComponent <TestGameServiceProvider>().TestAwake(); GameServiceProvider.CurrentInstance.AddService <IEventsOfInterestServiceInterface>(_interest); }
public void BeforeTest() { _inCamera = new GameObject().AddComponent <Camera>(); _actionStateMachine = new GameObject().AddComponent <MockActionStateMachineComponent>(); _inputBinder = _actionStateMachine.gameObject.AddComponent <MockInputBinderComponent>(); _health = _actionStateMachine.gameObject.AddComponent <MockHealthComponent>(); _character = _inputBinder.gameObject.AddComponent <TestCharacterComponent>(); _character.gameObject.AddComponent <TestUnityMessageEventDispatcherComponent>().TestAwake(); _controller = new GameObject().AddComponent <TestControllerComponent>(); _originalCamera = _controller.gameObject.AddComponent <Camera>(); _character.ActiveController = _controller; _cameraTime = 2.0f; _actionState = new CinematicCameraActionState(new CinematicCameraActionStateInfo(_character.gameObject, _inCamera, _cameraTime)); }
public void BeforeTest() { _stateMachine = new GameObject().AddComponent <MockActionStateMachineComponent>(); _inputBinder = _stateMachine.gameObject.AddComponent <MockInputBinderComponent>(); _character = _stateMachine.gameObject.AddComponent <TestCharacterComponent>(); _music = _character.gameObject.AddComponent <PlayerMusicComponent>(); var controller = new GameObject().AddComponent <ControllerComponent>(); _controllerAudio = controller.gameObject.AddComponent <AudioSource>(); _character.ActiveController = controller; var instance = new GameObject(); instance.AddComponent <MockInputComponent>(); instance.AddComponent <TestGameInstance>().TestAwake(); }