public void AfterTest() { GameInstance.ClearGameInstance(); _controllerAudio = null; _music = null; _character = null; _stateMachine = null; }
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(); }