internal CommandWrapper(int commandId, Dock dock)
            {
                _panelSwitcher = new PanelSwitcher(ServiceProvider, dock);

                var bottomCommandId = new CommandID(PackageGuids.guidSidePanelSwitcherPackageCmdSet, commandId);

                MenuCommand = new MenuCommand(ExecuteCommand, bottomCommandId);
            }
Example #2
0
    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);
     }
 }
Example #4
0
    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);
    }
Example #5
0
    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;
        }
    }
Example #6
0
 public void OnStageClear()
 {
     PanelSwitcher.AddPanel(PanelType.StageClear);
 }
Example #7
0
 public void OnContinue()
 {
     PanelSwitcher.HidePanel(PanelType.GameOver);
 }
Example #8
0
 public void OnGameOver()
 {
     PanelSwitcher.AddPanel(PanelType.GameOver);
 }
Example #9
0
 public void OnGameStart()
 {
     PanelSwitcher.SwitchPanel(PanelType.InGame);
 }
Example #10
0
 public void OnInitialized()
 {
     PanelSwitcher.SwitchPanel(PanelType.Title);
 }
Example #11
0
 /// <summary>
 /// Set the panelSwitcher
 /// </summary>
 private void Start()
 {
     panelSwitcher = PanelSwitcher.Instance;
 }