Exemplo n.º 1
0
 private void Submit(ISelectablePanel i_selectable_panel)
 {
     if (i_selectable_panel is ModeSelectedPanel)
     {
         var mode_select_panel = (ModeSelectedPanel)i_selectable_panel;
         GameStateManager.instance.mode = mode_select_panel.GetModeName;
         DebugLogger.Log(mode_select_panel.GetModeName);
         SceneManager.LoadScene("CharSelect");
     }
     else if (i_selectable_panel is IDisplayPanel)
     {
         var display_panel = (IDisplayPanel)i_selectable_panel;
         display_panel.Launch();
         Observable.Timer(TimeSpan.FromSeconds(0.1f))
         .Subscribe(n => {
             interfaceEventSystem.SubmitKey
             .First()
             .Subscribe(m => {
                 display_panel.Finish();
                 interfaceEventSystem.ReBoot();
             }).AddTo(this);
         });
     }
     else
     {
         DebugLogger.LogError(i_selectable_panel + " is should not be selecting");
         return;
     }
 }
Exemplo n.º 2
0
 public void RegistrationSelectable(ISelectablePanel selectable)
 {
     if (iSelectablePanels.Contains(selectable))
     {
         DebugLogger.LogError(selectable + " is contain in mylist");
         return;
     }
     iSelectablePanels.Add(selectable);
 }
Exemplo n.º 3
0
        private void Submit(ISelectablePanel i_selectable_panel)
        {
            if (!(i_selectable_panel is CharSelectedPanel))
            {
                DebugLogger.LogError(i_selectable_panel + " is should not be selecting");
                return;
            }
            var char_panel = (CharSelectedPanel)i_selectable_panel;

            myStream.OnNext(char_panel.charName);
        }
Exemplo n.º 4
0
        private void Focus(ISelectablePanel i_selectable_panel)
        {
            if (!(i_selectable_panel is CharSelectedPanel))
            {
                DebugLogger.LogError(i_selectable_panel + " is should not be selecting");
                return;
            }
            var char_panel = (CharSelectedPanel)i_selectable_panel;
            var index      = FindCharIndex(char_panel.charName);

            foreach (var obj in myObjs)
            {
                obj.SetActive(myObjs.IndexOf(obj) == index);
            }
        }