//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); }
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 spriteName, 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(spriteName, pImage, x, y, width, height, pColor); return(pNode); }
//---------------------------------------------------------------------- // 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); }
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(); GameSpriteMan pMan = GameSpriteMan.pActiveGSMan; 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); }
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); }
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); }