Example #1
0
        void DrawMapTip(Rect r)
        {
            // 選択した画像を描画する
            for (int z = 0; z < GetMapD(); z++)
            {
                int zz = (GetMapD() - z - 1);   //奥から

                int zpos = ((zz) * GRIDSIZE_Z); //奥行きのオフセット

                for (int y = 0; y < GetMapH(); y++)
                {
                    // int yy = (GetMapH() - y - 1); //奥から
                    int yy = y; //下から
                    for (int x = 0; x < GetMapW(); x++)
                    {
                        int     xx   = x; //奥から
                        Sprite  sp   = GetTipsSprite(new Vector3Int(xx, yy, zz), true);
                        Vector2 pos  = new Vector2(r.x + (xx * GRIDSIZE) + zpos, r.y - (yy * GRIDSIZE) - zpos);
                        Vector2 size = new Vector2(TIPSIZE, TIPSIZE);
                        //Rect drawRect = new Rect((pos + camPos_) * mag, size * mag);
                        Rect drawRect = new Rect((pos + camPos_) * mag, size * mag);

                        if (sp != null)
                        {
                            Debug.Log(drawRect);
                            GUI.DrawTextureWithTexCoords(drawRect, sp.texture, MapEditorMain.GetSpriteNormalRect(sp)); //描画
                        }
                    }
                }
            }
        }
        // サブウィンドウを開く
        public static MapFrontView WillAppear(MapEditorMain _parent)
        {
            MapFrontView window = (MapFrontView)EditorWindow.GetWindow(typeof(MapFrontView), false);

            window.Show();
            window.minSize = new Vector2(WINDOW_W, WINDOW_H);
            window.SetParent(_parent);
            window.Init();
            return(window);
        }
Example #3
0
        // サブウィンドウを開く
        public static MapEditorSub WillAppear(MapEditorMain _parent)
        {
            MapEditorSub window = (MapEditorSub)EditorWindow.GetWindow(typeof(MapEditorSub), false);

            window.Show();
            window.minSize = new Vector2(MapEditorMain.WINDOW_W, MapEditorMain.WINDOW_H);
            window.SetParent(_parent);
            window.ResetUndoPerformed();
            window.Init();
            return(window);
        }
 void SetParent(MapEditorMain _parent)
 {
     m_parent = _parent;
 }