Exemplo n.º 1
0
        public void AfterTest()
        {
            _heldItem  = null;
            _character = null;

            GameInstance.ClearGameInstance();
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public void AfterTest()
        {
            GameServiceProvider.ClearGameServiceProvider();

            _interest  = null;
            _point     = null;
            _character = null;
        }
Exemplo n.º 4
0
        public void AfterTest()
        {
            GameInstance.ClearGameInstance();

            _controllerAudio = null;
            _music           = null;

            _character    = null;
            _stateMachine = null;
        }
Exemplo n.º 5
0
        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;
        }
Exemplo n.º 7
0
        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>();
        }
Exemplo n.º 8
0
        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));
        }
Exemplo n.º 10
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();
        }