Esempio n. 1
0
    static public void Spawn()
    {
        if (mInst == null)
        {
            mInst = FindObjectOfType <NJGMapMono>();

            if (mInst == null)
            {
                GameObject go = GameObject.Find("_NJGMap");
                if (go == null)
                {
                    go = new GameObject("_NJGMap");
                    //DontDestroyOnLoad(go);
                    go.AddComponent <NJGMapMono>();
                }

                mInst = go.GetComponent <NJGMapMono>();
            }
        }
    }
Esempio n. 2
0
        /// <summary>
        /// Need to re-generate the texture map? Use this method at will.
        /// </summary>

        static public void GenerateMap()
        {
            NJGMapMono.Spawn();
            MapRenderer.instance.Render();
        }