示例#1
0
        void ReleaseDesignerOutlets()
        {
            if (Map != null)
            {
                Map.Dispose();
                Map = null;
            }

            if (Seletor != null)
            {
                Seletor.Dispose();
                Seletor = null;
            }

            if (Visor != null)
            {
                Visor.Dispose();
                Visor = null;
            }

            if (VisorWeb != null)
            {
                VisorWeb.Dispose();
                VisorWeb = null;
            }
        }
示例#2
0
    // Use this for initialization
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        boardScript = GameManager.instance.boardScript;
        //Comente para partes do infinito
        boardScript.columns  = 20;
        boardScript.rows     = 50;
        boardScript.matrixes = 30;

        /*//Descomente para partes do infinito
         * boardScript.columns = 10;
         * boardScript.rows = 10;
         * boardScript.matrixes = 10;
         */
        boardScript.BoardStart();
        boardScript.SetGrid();
        SoundManager.instance.PlayMusic(musicaEditor);          //TIRAR O COMENTÁRIO
        seletor = Instantiate(seletor, new Vector3(0, 0, 0), Quaternion.identity);
        seletor.Iniciar();
        seletor.Move(new Vector3(0, 0, 0));
        seletor.Desativar();
        GameManager.instance.DefinirEditor(true);
        CriarHUD(50, 30, 20);
        SetMenu(0);
        seletor.gameObject.SetActive(true);
        seletor.Ativar();
        SelecionarBloco();
    }