Beispiel #1
0
        public static void Dump()
        {
            GameSpriteMan pMan = GameSpriteMan.PrivGetInstance();

            Debug.Assert(pMan != null);

            pMan.BaseDump();
        }
Beispiel #2
0
        public static void Remove(GameSprite pSNode)
        {
            GameSpriteMan pSMan = GameSpriteMan.PrivGetInstance();

            Debug.Assert(pSMan != null);

            Debug.Assert(pSNode != null);
            pSMan.BaseRemove(pSNode);
        }
Beispiel #3
0
        private void PrivStatDump()
        {
            GameSpriteMan pSMan = GameSpriteMan.PrivGetInstance();

            Debug.Assert(pSMan != null);

            Debug.WriteLine("");
            Debug.WriteLine("GameSprite Manager Stats------------------------------");
            pSMan.BaseStatDump();
        }
Beispiel #4
0
        public static void Remove(GameSprite.Name name)
        {
            GameSpriteMan pMan = GameSpriteMan.PrivGetInstance();

            Debug.Assert(pMan != null);

            GameSprite pNode = Find(name);

            Debug.Assert(pNode != null);
            pMan.BaseRemove(pNode);
        }
Beispiel #5
0
        public static GameSprite Find(GameSprite.Name name)
        {
            GameSpriteMan pMan = GameSpriteMan.PrivGetInstance();

            Debug.Assert(pMan != null);

            pMan.poNodeCompare.name = name;

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

            return(pData);
        }
Beispiel #6
0
        public static GameSprite Find(GameSprite.Name name)
        {
            GameSpriteMan pSMan = GameSpriteMan.PrivGetInstance();

            Debug.Assert(pSMan != null);

            pSMan.poNodeCompare.SetName(name);

            GameSprite pSNode = (GameSprite)pSMan.BaseFind(pSMan.poNodeCompare);

            return(pSNode);
        }
        public static GameSprite Find(GameSprite.Name name)
        {
            GameSpriteMan pMan = GameSpriteMan.PrivGetInstance();

            Debug.Assert(pMan != null);

            // Compare functions only compares two Nodes

            // So:  Use the Compare Node - as a reference
            //      use in the Compare() function
            pMan.poNodeCompare.SetName(name);

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

            return(pData);
        }
Beispiel #8
0
        //optional add method to add color
        public static GameSprite Add(GameSprite.Name name, Image.Name ImageName, float x, float y, float width, float height, float red, float green, float blue)
        {
            GameSpriteMan pSMan = GameSpriteMan.PrivGetInstance();

            Debug.Assert(pSMan != null);

            GameSprite pSNode = (GameSprite)pSMan.BaseAdd();

            Debug.Assert(pSNode != null);

            Image pImage = ImageMan.Find(ImageName);

            Debug.Assert(pSNode != null);

            pSNode.Set(name, pImage, x, y, width, height, new Azul.Color(red, green, blue));
            return(pSNode);
        }
Beispiel #9
0
        public static void Destroy()
        {
            // Get the instance
            GameSpriteMan pMan = GameSpriteMan.PrivGetInstance();

            Debug.Assert(pMan != null);
#if (TRACK_DESTRUCTOR_MAN)
            Debug.WriteLine("--->GameSpriteMan.Destroy()");
#endif
            pMan.BaseDestroy();

#if (TRACK_DESTRUCTOR_MAN)
            Debug.WriteLine("     {0} ({1})", pMan.poNodeCompare, pMan.poNodeCompare.GetHashCode());
            Debug.WriteLine("     {0} ({1})", GameSpriteMan.pInstance, GameSpriteMan.pInstance.GetHashCode());
#endif

            pMan.poNodeCompare      = null;
            GameSpriteMan.pInstance = null;
        }
        public static GameSprite Add(GameSprite.Name name, Image.Name ImageName, float x, float y, float width, float height, Azul.Color pColor = null)
        {
            GameSpriteMan pMan = GameSpriteMan.PrivGetInstance();

            Debug.Assert(pMan != null);

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

            Debug.Assert(pNode != null);

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

            Debug.Assert(pImage != null);


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

            return(pNode);
        }
Beispiel #11
0
        public static GameSprite Add(GameSprite.Name name, Image.Name ImageName, float x, float y, float width, float height, float r, float g, float b, float a)
        {
            GameSpriteMan pMan = GameSpriteMan.PrivGetInstance();

            Debug.Assert(pMan != null);

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

            Debug.Assert(pNode != null);

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

            //Debug.Assert(pImage != null);
            if (pImage == null)
            {
                pImage = ImageMan.Find(Image.Name.Default);
                Debug.Assert(pImage != null);
            }

            pNode.Set(name, pImage, x, y, width, height, new Azul.Color(r, g, b, a));

            return(pNode);
        }