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; } }
public void RegistrationSelectable(ISelectablePanel selectable) { if (iSelectablePanels.Contains(selectable)) { DebugLogger.LogError(selectable + " is contain in mylist"); return; } iSelectablePanels.Add(selectable); }
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); }
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); } }