コード例 #1
0
        public void AfterTest()
        {
            _spawnable          = null;
            _actionStateMachine = null;
            _health             = null;

            _spawner = null;
        }
コード例 #2
0
        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);
        }