public void AfterTest() { GameModeComponent.RegisteredGameMode = null; _actionStateMachine = null; _cameraTrigger.TestDestroy(); _cameraTrigger = null; _camera = null; }
public void BeforeTest() { var gameObject = new GameObject(); _camera = gameObject.AddComponent <Camera>(); _cameraTrigger = gameObject.AddComponent <TestCinematicCameraTriggerResponseComponent>(); _cameraTrigger.TriggerObject = new GameObject(); _cameraTrigger.TriggerObject.AddComponent <TestUnityMessageEventDispatcherComponent>().TestAwake(); _cameraTrigger.TestStart(); _actionStateMachine = new GameObject().AddComponent <MockActionStateMachineComponent>(); var controller = new GameObject().AddComponent <ControllerComponent>(); controller.SetPawn(_actionStateMachine.gameObject); var gameMode = new GameObject().AddComponent <TestGameModeComponent>(); GameModeComponent.RegisteredGameMode = gameMode; gameMode.SetActiveController(controller); }