コード例 #1
0
        //オブジェクト作成
        void CreateObject()
        {
            if (m_objMaker == null)
            {
                m_objMaker = new MapObjMaker();
            }

            m_objMaker.CreateObject(m_mapTips, m_mapId);

            // 完了ポップアップ
            EditorUtility.DisplayDialog("CreateObject", "マップオブジェクトを生成しました。", "ok");
        }
コード例 #2
0
        //ロード
        void LoadMapTipSprite()
        {
            // 読み込み(Resources.LoadAllを使うのがミソ)
            m_objMaker = new MapObjMaker();
            m_dummy    = new Texture2D(TIPSIZE, TIPSIZE);
            m_dummy2   = new Texture2D((int)(TIPSIZE * 2.5f), (int)(TIPSIZE * 1.5f));
            m_dummy3   = new Texture2D((int)(TIPSIZE * 1.5f), (int)(TIPSIZE * 1.5f));

            m_mapShapeTex = new List <Texture>();
            m_mapShapeTex = NonResources.LoadAll <Texture>(MapEditorMain.MapTipPaletteImagePath);

            m_mapPaletteSprite = new List <Sprite>();
            m_mapPaletteSprite.AddRange(Resources.LoadAll <Sprite>(MapEditorMain.MapTileName));

            AssetDatabase.Refresh();

            m_isLoadSprite = true;
        }