Example #1
0
    void OnFocus()
    {
        if (maxRows <= 0)
        {
            maxRows = 30;
        }
        if (maxCols <= 0)
        {
            maxCols = 11;
        }

        Initialize();
        LoadDataFromLocal(levelNumber);
        LevelEditorBase lm = GameObject.FindWithTag("LevelEditor").GetComponent <LevelEditorBase>();

        //解决打开错误场景后窗口卡住的问题
        if (lm == null)
        {
            Debug.LogError("Can't find LevelEditorBase组件!");
            window.Close();
        }
        ballTex = new Texture[lm.sprites.Length];
        for (int i = 0; i < lm.sprites.Length; i++)
        {
            ballTex[i] = lm.sprites[i].texture;
        }
    }
Example #2
0
    void OnFocus()
    {
        if (maxRows <= 0)
        {
            maxRows = 30;
        }
        if (maxCols <= 0)
        {
            maxCols = 11;
        }

        Initialize();
        LoadDataFromLocal(levelNumber);
        LevelEditorBase lm = GameObject.Find("LevelEditorBase").GetComponent <LevelEditorBase>();

        ballTex = new Texture[lm.sprites.Length];
        for (int i = 0; i < lm.sprites.Length; i++)
        {
            ballTex[i] = lm.sprites[i].texture;
        }
    }
Example #3
0
 void Awake()
 {
     THIS = this;
 }