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); }
//---------------------------------------------------------------------- // 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); }