Exemplo n.º 1
0
    // ===========================================================
    // Methods
    // ===========================================================

    void CreateGrid(MadRootNode root, MadLevelIcon icon, MadSprite slideLeft, MadSprite slideRight)
    {
        var panel      = MadTransform.FindChild <MadPanel>(root.transform);
        var gridLayout = MadLevelGridTool.CreateUnderPanel(panel);

        gridLayout.iconTemplate     = icon;
        gridLayout.leftSlideSprite  = slideLeft;
        gridLayout.rightSlideSprite = slideRight;
        gridLayout.dirty            = true;
    }
Exemplo n.º 2
0
        static void CreateGridLayout()
        {
            var panel = MadPanel.UniqueOrNull();

            if (panel != null)
            {
                MadLevelGridTool.CreateUnderPanel(panel);
            }
            else
            {
                ScriptableWizard.DisplayWizard <MadLevelGridTool>("Create Grid Layout", "Create");
            }
        }