public void AfterTest()
        {
            GameServiceProvider.ClearGameServiceProvider();

            _characterComponent = null;
            _inputBinder        = null;
        }
Ejemplo n.º 2
0
        public void AfterTest()
        {
            GameInstance.ClearGameInstance();

            _inputBinder = null;

            Cursor.visible = _priorCursorStatus;
        }
        public void AfterTest()
        {
            _pushSocket = null;

            _rigidbody      = null;
            _inputBinder    = null;
            _pushableObject = null;
        }
Ejemplo n.º 4
0
        public void AfterTest()
        {
            _playerCamera = null;

            _characterComponent = null;
            _actionStateMachine = null;
            _inputBinder        = null;
        }
Ejemplo n.º 5
0
        public void AfterTest()
        {
            _animal.TestDestroy();
            _animal = null;

            _inputBinder = null;

            GameInstance.ClearGameInstance();
        }
        public void BeforeTest()
        {
            _pushableObject = new GameObject().AddComponent <MockPushableObjectComponent>();
            _inputBinder    = new GameObject().AddComponent <MockInputBinderComponent>();
            _rigidbody      = _inputBinder.gameObject.AddComponent <Rigidbody2D>();

            _pushSocket = new GameObject();
            _pushSocket.transform.Rotate(1.0f, 2.0f, 3.0f);
            _pushSocket.transform.position = new Vector3(1.0f, 2.0f, 3.0f);
        }
Ejemplo n.º 7
0
        public void BeforeTest()
        {
            _inputBinder        = new GameObject().AddComponent <MockInputBinderComponent>();
            _actionStateMachine = _inputBinder.gameObject.AddComponent <MockActionStateMachineComponent>();
            _characterComponent = _inputBinder.gameObject.AddComponent <CharacterComponent>();
            _inputBinder.gameObject.AddComponent <TestUnityMessageEventDispatcherComponent>().TestAwake();

            _characterComponent.ActiveController = _inputBinder.gameObject.AddComponent <ControllerComponent>();
            _playerCamera = _characterComponent.ActiveController.gameObject.AddComponent <MockPlayerCameraComponent>();
        }
Ejemplo n.º 8
0
        public void AfterTest()
        {
            _deadActionState = null;

            _heldItem     = null;
            _stamina      = null;
            _playerBinder = null;

            GameModeComponent.RegisteredGameMode = null;
        }
        public void BeforeTest()
        {
            _inputBinder = new GameObject().AddComponent <MockInputBinderComponent>();
            _inputBinder.gameObject.AddComponent <MockActionStateMachineComponent>();
            _characterComponent = _inputBinder.gameObject.AddComponent <CharacterComponent>();
            _characterComponent.ActiveController = _inputBinder.gameObject.AddComponent <ControllerComponent>();
            _characterComponent.gameObject.AddComponent <TestUnityMessageEventDispatcherComponent>().TestAwake();

            new GameObject().AddComponent <TestGameServiceProvider>().TestAwake();
            GameServiceProvider.CurrentInstance.AddService <ITimeServiceInterface>(new MockTimeService());
        }
Ejemplo n.º 10
0
        public void BeforeTest()
        {
            _priorCursorStatus = Cursor.visible;

            var owner = new GameObject();

            _inputBinder = owner.AddComponent <MockInputBinderComponent>();

            _actionState = new OpenMenuUIActionState(new ActionStateInfo(owner));

            var instanceObject = new GameObject().AddComponent <MockInputComponent>();

            instanceObject.gameObject.AddComponent <TestGameInstance>().TestAwake();
        }
Ejemplo n.º 11
0
        public void BeforeTest()
        {
            new GameObject().AddComponent <MockInputComponent>().gameObject.AddComponent <TestGameInstance>().TestAwake();

            var characterObject = new GameObject();

            _inputBinder = characterObject.AddComponent <MockInputBinderComponent>();
            characterObject.AddComponent <MockActionStateMachineComponent>();
            characterObject.AddComponent <MockSpeciesComponent>();
            characterObject.AddComponent <TestUnityMessageEventDispatcherComponent>().TestAwake();

            _animal = characterObject.AddComponent <TestAnimalCharacterComponent>();
            _animal.TestStart();
        }
        public void AfterTest()
        {
            _actionState = null;

            _originalCamera = null;
            _controller     = null;

            _character          = null;
            _health             = null;
            _inputBinder        = null;
            _actionStateMachine = null;

            _inCamera = null;
        }
Ejemplo n.º 13
0
        public void BeforeTest()
        {
            var gameMode = new GameObject();

            gameMode.AddComponent <TestUnityMessageEventDispatcherComponent>().TestAwake();

            GameModeComponent.RegisteredGameMode = gameMode.AddComponent <TestGameModeComponent>();

            var player = new GameObject();

            player.AddComponent <TestUnityMessageEventDispatcherComponent>().TestAwake();
            _playerBinder = player.AddComponent <MockInputBinderComponent>();
            _stamina      = player.AddComponent <MockStaminaComponent>();
            _heldItem     = player.AddComponent <MockHeldItemComponent>();
            _params       = new DeadActionStateParams {
                CanRespawn = true
            };
        }
        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));
        }
Ejemplo n.º 15
0
        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();
        }
Ejemplo n.º 16
0
 public void AfterTest()
 {
     _actionState = null;
     _inputBinder = null;
 }
Ejemplo n.º 17
0
        public void BeforeTest()
        {
            _inputBinder = new GameObject().AddComponent <MockInputBinderComponent>();

            _actionState = new MainMenuActionState(new ActionStateInfo(_inputBinder.gameObject));
        }