internal CommandWrapper(int commandId, Dock dock) { _panelSwitcher = new PanelSwitcher(ServiceProvider, dock); var bottomCommandId = new CommandID(PackageGuids.guidSidePanelSwitcherPackageCmdSet, commandId); MenuCommand = new MenuCommand(ExecuteCommand, bottomCommandId); }
private void PanelMotionOpen() { UISwitchAnim anim = UIMotionSystem.GetAnim(this.prefabName); if (anim != null && anim.ShowAnim > 0) { this.SetMaskNonLink(); PanelSwitcher.DoAnim(base.get_transform(), anim.ShowAnim, delegate { this.ActionOpen(); }); } }
/// <summary> /// Create Instance or Destroy script if one already exists /// Set Unused sets /// </summary> void Awake() { if (PanelSwitcher.Instance == null) { Instance = this; optionSelector = GetComponent <OptionSelector>(); } else { Debug.Log("A Panel Switcher already exists in the scene, this script will destroy itself", this.gameObject); Destroy(this); } }
private bool PanelMotionClose() { UISwitchAnim anim = UIMotionSystem.GetAnim(this.prefabName); if (anim != null && anim.HideAnim > 0) { this.SetMaskNonLink(); PanelSwitcher.DoAnim(base.get_transform(), anim.HideAnim, delegate { this.ActionClose(); }); return(true); } return(false); }
public static void DoAnim(Transform root, int animId, Action callback = null) { PanelSwitcher panelSwitcher = root.get_gameObject().AddUniqueComponent <PanelSwitcher>(); panelSwitcher.AnimCallBack = callback; switch (animId) { case 1: panelSwitcher.DoVerticalOpen(); break; case 2: panelSwitcher.DoVerticalClose(); break; case 3: panelSwitcher.DoHorizonalVerticalOpen(); break; case 4: panelSwitcher.DoHorizonalVerticalClose(); break; case 5: panelSwitcher.DoVerticalOpen_a(); break; case 6: panelSwitcher.DoVerticalClose_a(); break; case 7: panelSwitcher.DoHorizonalVerticalOpen_a(); break; case 8: panelSwitcher.DoHorizonalVerticalClose_a(); break; } }
public void OnStageClear() { PanelSwitcher.AddPanel(PanelType.StageClear); }
public void OnContinue() { PanelSwitcher.HidePanel(PanelType.GameOver); }
public void OnGameOver() { PanelSwitcher.AddPanel(PanelType.GameOver); }
public void OnGameStart() { PanelSwitcher.SwitchPanel(PanelType.InGame); }
public void OnInitialized() { PanelSwitcher.SwitchPanel(PanelType.Title); }
/// <summary> /// Set the panelSwitcher /// </summary> private void Start() { panelSwitcher = PanelSwitcher.Instance; }