示例#1
0
        private void StartTest()
        {
            this.TestControllerConfiguration.TestControllerDefinition.StartTest = false;
            var aTestScenarioDefinition = this.TestControllerConfiguration.TestControllerDefinition.aTestScenarioDefinition;

            this.TestEntitiesPrefabInstance = GameObject.Instantiate(aTestScenarioDefinition.TestEntitiesPrefab);
            aTestScenarioDefinition.BeforeObjectInitialization();
            RangeObjectV2Manager.InitializeAllRangeObjects();
            InteractiveObjectV2Manager.Get().InitializeAllInteractiveObjectsInitializer();

            /// By default player has infinite health
            PlayerInteractiveObjectManager.Get().PlayerInteractiveObject.DealDamage(9999999, null);

            this.SequencedActionPlayer = new SequencedActionPlayer(aTestScenarioDefinition.BuildScenarioActions());
            this.SequencedActionPlayer.Play();
        }
示例#2
0
    private void Tick()
    {
        if (Application.isPlaying)
        {
            var allInteractiveObjects = InteractiveObjectV2Manager.Get().InteractiveObjects;
            foreach (var interactiveObject in allInteractiveObjects)
            {
                OnInteractiveObjectCreated(interactiveObject);
            }

            var allRangeObjects = RangeObjectV2Manager.Get().RangeObjects;
            foreach (var rangeObject in allRangeObjects)
            {
                OnInteractiveObjectCreated(rangeObject);
            }

            SelectedInteractiveObjectDetail.OnGui();
        }
    }
示例#3
0
    private void OnSearchTextChange(ChangeEvent <string> evt)
    {
        if (Application.isPlaying)
        {
            var allInteractiveObjects = InteractiveObjectV2Manager.Get().InteractiveObjects;
            var allRangeObjects       = RangeObjectV2Manager.Get().RangeObjects;

            var allInteractiveObjectsClassname = allInteractiveObjects.ToList()
                                                 .Select(i => i).Where(i => string.IsNullOrEmpty(SeachTextElement.text) || i.InteractiveGameObject.InteractiveGameObjectParent.name.ToLower().Contains(SeachTextElement.text.ToLower())).ToList()
                                                 .ConvertAll(i => i.GetType().Name)
                                                 .Union(
                allRangeObjects.Select(r => r).Where(r => string.IsNullOrEmpty(SeachTextElement.text) || r.RangeGameObjectV2.RangeGameObject.name.ToLower().Contains(SeachTextElement.text.ToLower())).ToList()
                .ConvertAll(r => r.GetType().Name)
                )
                                                 .ToList();
            foreach (var classHeaderElement in ClassHeaderElements)
            {
                classHeaderElement.Value.style.display = allInteractiveObjectsClassname.Contains(classHeaderElement.Key) ? DisplayStyle.Flex : DisplayStyle.None;
            }
        }
    }
示例#4
0
        private void Start()
        {
            OnStart();


            RangeObjectV2Manager.Get().Init();
            GroundEffectsManagerV2.Get().Init(LevelManagementConfigurationGameObject.Get().LevelConfiguration.ConfigurationInherentData[LevelManager.Get().GetCurrentLevel()].LevelRangeEffectInherentData);
            InteractiveObjectV2Manager.Get().Init();

            CameraMovementManager.Get().Init();

            CircleFillBarRendererManager.Get().Init();
            TutorialManager.Get().Init();
            SelectableObjectManagerV2.Get().Init(GameInputManager.Get());

            PlayerActionEntryPoint.Get().Init();
#if UNITY_EDITOR
            EditorOnlyManagers = new EditorOnlyManagers();
            EditorOnlyManagers.Init();
#endif
        }
示例#5
0
        private void ClearTest()
        {
            this.TestControllerConfiguration.TestControllerDefinition.ClearTest = false;
            this.SequencedActionPlayer.Kill();

            var allInteractiveObjects = InteractiveObjectV2Manager.Get().InteractiveObjects;

            List <RangeObjectV2> ExcludedRangesToDestroy = new List <RangeObjectV2>();

            for (var i = allInteractiveObjects.Count - 1; i >= 0; i--)
            {
                //We dont remove the level chunk
                if (allInteractiveObjects[i].GetType() != typeof(LevelChunkInteractiveObject))
                {
                    allInteractiveObjects[i].Destroy();
                }
                else
                {
                    ExcludedRangesToDestroy.Add((allInteractiveObjects[i] as LevelChunkInteractiveObject).GetLevelChunkRangeObject());
                }
            }

            for (var i = RangeObjectV2Manager.Get().RangeObjects.Count - 1; i >= 0; i--)
            {
                if (!ExcludedRangesToDestroy.Contains(RangeObjectV2Manager.Get().RangeObjects[i]))
                {
                    RangeObjectV2Manager.Get().RangeObjects[i].OnDestroy();
                }
            }

            MonoBehaviour.Destroy(TestEntitiesPrefabInstance);
            GameTestMockedInputManager.MockedInstance.GetGameTestMockedXInput().GameTestInputMockedValues.Reset();

            ///Reset camera position
            CameraMovementJobManager.Get().SetTargetPosition(this.InitialCameraPivotPointTransform);
            CameraMovementJobManager.Get().SetCameraZoon(this.InitialCameraZoom);

            ///Reset time management
            TimeManagementManager.Get().Reset();
        }
示例#6
0
        private void Update()
        {
            var d = Time.deltaTime;

            BeforeTick(d);


            TutorialManager.Get().Tick(d);
            PuzzleTutorialEventSenderManager.Get().Tick(d);

            BlockingCutscenePlayerManager.Get().Tick(d);

            PlayerActionEntryPoint.Get().Tick(d);

            PlayerInteractiveObjectManager.Get().Tick(d);
            PlayerInteractiveObjectManager.Get().AfterTicks(d);

            CameraMovementManager.Get().Tick(d);

            ObstacleOcclusionCalculationManagerV2.Get().Tick(d);
            RangeIntersectionCalculationManagerV2.Get().Tick(d);

            RangeObjectV2Manager.Get().Tick(d);

            InteractiveObjectV2Manager.Get().Tick(d);

            InteractiveObjectV2Manager.Get().AfterTicks(d);

            GroundEffectsManagerV2.Get().Tick(d);
            DottedLineRendererManager.Get().Tick();
            SelectableObjectManagerV2.Get().Tick(d);
            CircleFillBarRendererManager.Get().Tick(d);

#if UNITY_EDITOR
            EditorOnlyManagers.Tick(d);
#endif
        }