示例#1
0
    private void Awake()
    {
        if (instance != null)
        {
            Destroy(gameObject);
            instance = null;
        }

        instance = this;
        if (TileList.isEmptyImageList())
        {
            TileList.SetSpriteList();
        }
    }
示例#2
0
    private static void init()
    {
        LevelEditor window =
            (LevelEditor)EditorWindow.GetWindow(typeof(LevelEditor),
                                                utility: true,
                                                title: "CreateLevel");

        var width  = 500;
        var height = 800;

        var x = (Screen.currentResolution.width - width) / 2;
        var y = (Screen.currentResolution.height - height) / 2;

        window.position = new Rect(x, y, width, height);

        TileList.ClearTileList();

        if (TileList.isEmptyImageList())
        {
            TileList.SetImageList();
            Debug.Log("이미지 불러오기 세팅");
        }
        window.Show();
    }