public static void Dump()
        {
            GameSpriteManager pMan = GameSpriteManager.privGetInstance();

            Debug.Assert(pMan != null);

            pMan.BaseDump();
        }
        public static void Remove(GameSprite pNode)
        {
            GameSpriteManager pMan = GameSpriteManager.privGetInstance();

            Debug.Assert(pMan != null);

            Debug.Assert(pNode != null);
            pMan.BaseRemove(pNode);
        }
Exemple #3
0
        public static void Remove(GameSprite pSprite)
        {
            GameSpriteManager pManager = GameSpriteManager.privGetInstance();

            Debug.Assert(pManager != null);
            Debug.Assert(pSprite != null);

            // delegate to abstract manager who deals with the DLinks
            pManager.baseRemove(pSprite);
        }
        public static GameSprite Find(GameSprite.Name name)
        {
            GameSpriteManager pMan = GameSpriteManager.privGetInstance();

            Debug.Assert(pMan != null);


            pMan.poNodeCompare.name = name;

            GameSprite pData = (GameSprite)pMan.BaseFind(pMan.poNodeCompare);

            return(pData);
        }
Exemple #5
0
        public static GameSprite Find(GameSprite.Name theName)
        {
            GameSpriteManager pSpriteManager = GameSpriteManager.privGetInstance();

            Debug.Assert(pSpriteManager != null);

            // set common compare node, static object ref
            pSpriteManager.poNodeCompare.SetName(theName);

            //find and return ref
            GameSprite pSprite = (GameSprite)pSpriteManager.baseFind(pSpriteManager.poNodeCompare);

            return(pSprite);
        }
Exemple #6
0
        public static void Destroy()
        {
            // Get the instance
            GameSpriteManager pMan = GameSpriteManager.privGetInstance();

            Debug.WriteLine("--->GameSpriteMan.Destroy()");
            pMan.baseDestroy();

#if (TRACK_DESTRUCTOR)
            Debug.WriteLine("     {0} ({1})", GameSpriteMan.pSpriteRef, GameSpriteMan.pSpriteRef.GetHashCode());
            Debug.WriteLine("     {0} ({1})", GameSpriteMan.pInstance, GameSpriteMan.pInstance.GetHashCode());
#endif
            GameSpriteManager.pSpriteRef = null;
            GameSpriteManager.pInstance  = null;
        }
Exemple #7
0
        public static GameSprite Add(GameSprite.Name spriteName, Image.Name imageName, float x, float y, float width, float height)
        {
            GameSpriteManager pMan = GameSpriteManager.privGetInstance();

            Debug.Assert(pMan != null);

            Image pImage = ImageManager.Find(imageName);

            Debug.Assert(pImage != null);

            GameSprite pNode = (GameSprite)pMan.baseAddToFront();

            Debug.Assert(pNode != null);

            pNode.Set(spriteName, pImage, x, y, width, height);
            return(pNode);
        }
        public static GameSprite Add(GameSprite.Name name, Image.Name ImageName, float x, float y, float width, float height, Azul.Color pColor = null)
        {
            GameSpriteManager pMan = GameSpriteManager.privGetInstance();

            Debug.Assert(pMan != null);

            GameSprite pNode = (GameSprite)pMan.BaseAdd();

            Debug.Assert(pNode != null);

            // Initialize the data
            Image pImage = ImageManager.Find(ImageName);

            Debug.Assert(pImage != null);

            pNode.Set(name, pImage, x, y, width, height, pColor);

            return(pNode);
        }
Exemple #9
0
        //----------------------------------------------------------------------
        // 4 Wrapper methods: baseAdd, baseFind, baseRemove, baseDump
        //----------------------------------------------------------------------
        public static GameSprite Add(GameSprite.Name spriteName,
                                     Image.Name imageName, Azul.Rect pScreenRect, Azul.Color pColor = null)
        {
            GameSpriteManager pMan = GameSpriteManager.privGetInstance();

            Debug.Assert(pMan != null);

            Image pImage = ImageManager.Find(imageName);

            Debug.Assert(pImage != null);

            GameSprite pNode = (GameSprite)pMan.baseAddToFront();

            Debug.Assert(pNode != null);

            // wash it
            pNode.Set(spriteName, pImage, pScreenRect, pColor);
            return(pNode);
        }
Exemple #10
0
        public static GameSprite Add(GameSprite.Name spName, Image.Name imgName, float x, float y, float w, float h, Azul.Color pColor = null)
        {
            GameSpriteManager pManager = GameSpriteManager.privGetInstance();

            Debug.Assert(pManager != null);

            //grab a DLink
            GameSprite pSprite = (GameSprite)pManager.baseAdd();

            Debug.Assert(pSprite != null);

            //initialize
            Image pImage = ImageManager.Find(imgName);

            Debug.Assert(pImage != null);

            pSprite.Set(spName, pImage, x, y, w, h, pColor);

            return(pSprite);
        }
Exemple #11
0
        public static void Print()
        {
            GameSpriteManager pManager = GameSpriteManager.privGetInstance();

            pManager.basePrint();
        }
        public static void Destroy()
        {
            GameSpriteManager pMan = GameSpriteManager.privGetInstance();

            Debug.Assert(pMan != null);
        }