예제 #1
0
        public static void Remove(Texture pTexture)
        {
            //ensure call Create() first
            TextureMan pMan = TextureMan.GetInstance();

            Debug.Assert(pMan != null);

            // ensure pTexture is not null
            Debug.Assert(pTexture != null);
            pMan.baseRemove(pTexture);
        }
예제 #2
0
        public static void Destory()
        {
            //ensure call Create() first
            TextureMan pMan = TextureMan.GetInstance();

            Debug.Assert(pMan != null);

            pMan.baseDestory();

            pMan.poNodeForCompare = null;
            TextureMan.pInstance  = null;
        }
예제 #3
0
        public static Texture Find(Texture.Name name)
        {
            //ensure call Create() first
            TextureMan pMan = TextureMan.GetInstance();

            Debug.Assert(pMan != null);

            // find the texture by specific texture name
            pMan.poNodeForCompare.setName(name);
            Texture pTexture = (Texture)pMan.baseFind(pMan.poNodeForCompare);

            return(pTexture);
        }
예제 #4
0
        public static Texture Add(Texture.Name name, string pTextureFile)
        {
            //ensure call Create() first
            TextureMan pMan = TextureMan.GetInstance();

            Debug.Assert(pMan != null);

            //add Texture to active list
            Texture pTexture = (Texture)pMan.baseAdd();

            Debug.Assert(pTexture != null);

            // set new texture
            Debug.Assert(pTextureFile != null);
            pTexture.set(name, pTextureFile);

            return(pTexture);
        }