private void OnEndLevel() { AfterLevelTimer -= Time.DeltaTime; if (AfterLevelTimer <= 0) { //Toggle off UI MonoGameVariables.Instance.Hell_WinText.gameObject.SetActive(false); MonoGameVariables.Instance.Hell_WaitingTimer.gameObject.SetActive(false); //Return to previous map GlobalEventListenerSystem.OnExitHellLevel(); //Disable self Enabled = false; return; } //Look if should create number if (AfterLevelTimer <= PreviousDisplayedNumber - 1) { PreviousDisplayedNumber--; //Reset text scale MonoGameVariables.Instance.Hell_WaitingTimer.transform.localScale = new Vector3(1, 1, 1); MonoGameVariables.Instance.Hell_WaitingTimer.text = PreviousDisplayedNumber.ToString(); MonoGameVariables.Instance.Hell_WaitingTimer.StartCoroutine(DecreaseTextSize(MonoGameVariables.Instance.Hell_WaitingTimer)); } }
protected override void OnCreate() { var world = World.DefaultGameObjectInjectionWorld; stateEventSystem = world.GetOrCreateSystem <StateEventSystem>(); animationEventSystem = world.GetOrCreateSystem <AnimationEventSystem>(); interactableEventSystem = world.GetOrCreateSystem <InteractableEventSystem>(); soundEventSystem = world.GetOrCreateSystem <SoundEventSystem>(); lootSystem = world.GetOrCreateSystem <LootSystem>(); visualEventSystem = world.GetOrCreateSystem <VisualEventSystem>(); cleanupSystem = world.GetOrCreateSystem <CleanupSystem>(); dropSystem = world.GetOrCreateSystem <DropSystem>(); uiSystem = world.GetOrCreateSystem <UISystem>(); globalEventListenerSystem = world.GetOrCreateSystem <GlobalEventListenerSystem>(); playerCollisionSystem = world.GetOrCreateSystem <PlayerCollisionSystem>(); invincibleSystem = world.GetOrCreateSystem <InvincibleSystem>(); interactableDoorSystem = world.GetOrCreateSystem <InteractableDoorSystem>(); var presentation = world.GetOrCreateSystem <PresentationManager>(); presentation.AddSystemToUpdateList(stateEventSystem); presentation.AddSystemToUpdateList(animationEventSystem); presentation.AddSystemToUpdateList(interactableEventSystem); presentation.AddSystemToUpdateList(lootSystem); presentation.AddSystemToUpdateList(visualEventSystem); presentation.AddSystemToUpdateList(soundEventSystem); presentation.AddSystemToUpdateList(cleanupSystem); presentation.AddSystemToUpdateList(dropSystem); presentation.AddSystemToUpdateList(uiSystem); presentation.AddSystemToUpdateList(globalEventListenerSystem); presentation.AddSystemToUpdateList(invincibleSystem); presentation.AddSystemToUpdateList(interactableDoorSystem); // presentation.AddSystemToUpdateList(playerCollisionSystem); presentation.SortSystemUpdateList(); }