public void AfterTest() { _spawnable = null; _actionStateMachine = null; _health = null; _spawner = null; }
public void BeforeTest() { _spawner = new GameObject().AddComponent <MockSpawnerComponent>(); _health = new GameObject().AddComponent <MockHealthComponent>(); _actionStateMachine = _health.gameObject.AddComponent <MockActionStateMachineComponent>(); _health.gameObject.AddComponent <TestUnityMessageEventDispatcherComponent>().TestAwake(); _spawnable = _health.gameObject.AddComponent <TestAISpawnableComponent>(); _spawnable.SetSpawner(_spawner); }
public void AfterTest() { _actionState = null; _originalCamera = null; _controller = null; _character = null; _health = null; _inputBinder = null; _actionStateMachine = null; _inCamera = null; }
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)); }