Esempio n. 1
0
        public static void ShowEditor(SWNodeMask node)
        {
            if (Instance != null)
            {
                Instance.Close();
            }
            var window = EditorWindow.GetWindow <SWWindowDrawMask> (true, "Mask");

            window.Init(node);
            window.InitOnce();
        }
Esempio n. 2
0
        public void Init(SWNodeMask _node)
        {
            hasRightup = false;
            node       = _node;
            SetLayerMask(node);

            ePopup_texRes = new SWEnumPopup(new string[] { "128x128", "256x256", "512x512", "1024x1024" }, (int)node.data.reso, SWEditorUI.MainSkin.button,
                                            delegate(int index){
                node.data.reso = (SWTexResolution)index;
                pause          = true;
                EditorCoroutineRunner.StartEditorCoroutine(ResizeTex(node.data.reso));
            });
        }
Esempio n. 3
0
 public Texture2D GetParentTexture()
 {
     if (GetParentNode().data.type == SWNodeType.mask)
     {
         SWNodeMask mask = (SWNodeMask)GetParentNode();
         return(mask.texMask.Texture);
         //return mask.info.texPreview;
     }
     else
     {
         return(GetParentNode().Texture);
     }
 }
Esempio n. 4
0
 void ShowBG_Masks()
 {
     foreach (var item in SWWindowMain.Instance.NodeAll())
     {
         if (!(item.Value is SWNodeMask))
         {
             continue;
         }
         if (!node.data.layerMask.Has(item.Value.data.id))
         {
             continue;
         }
         var        dt       = item.Value.data;
         SWNodeMask nodeMask = (SWNodeMask)item.Value;
         Material   matBot   = new Material(SWEditorUI.GetShader("RectTRSPremask"));
         Set_Material(matBot, -dt.effectData.t_startMove, dt.effectData.r_angle, dt.effectData.s_scale);
         Graphics.DrawTexture(drawRect, nodeMask.texMask.Texture, matBot);
     }
 }
Esempio n. 5
0
 public void Init(SWNodeMask _node)
 {
     node = _node;
     SetLayerMask(node);
 }