Beispiel #1
0
 public void StopDemo()
 {
     mixer.SetFloat(mixerFloatMusic, 0f);
     mixer.SetFloat(mixerFloatDemoVideo, -80f);
     onDemoWillStop.Invoke();
     uHooks.RemoveOnUpdate(this);
 }
Beispiel #2
0
        public void OpenPanel(UIPanelRef panelRef)
        {
            int instanceId = panelRef.GetInstanceID();

            if (instanceId == currentPanelInstanceId)
            {
                return;
            }

            UIPanel nextPanel;

            if (!panels.TryGetValue(instanceId, out nextPanel))
            {
                return;
            }

            uHooks.RemoveOnUpdate(this);
            ClosePanel(currentPanelInstanceId);

            currentOptions.Clear();
            currentOptions.AddRange(nextPanel.MenuOptions);
            currentPanelRefs.Clear();
            currentPanelRefs.AddRange(nextPanel.PanelRefs);
            currentOption = 0;
            DeselectAllMenuOptions();
            HighlightMenuOption(currentOption);

            if (currentOptions.Count > 0)
            {
                uHooks.AddOnUpdate(this);
            }

            nextPanel.Open();
            currentPanelInstanceId = instanceId;
        }
Beispiel #3
0
 public void RemoveUpdate()
 {
     hooks.RemoveOnUpdate(this);
 }
 public void OnLevelExit()
 {
     hooks.RemoveOnUpdate(this);
     onGameWon.Invoke();
     gameMode.Deactivate();
 }