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); }
public static GameSprite Add(GameSprite.Name gameSpriteName, Image.Name imageName, float x, float y, float width, float height, Azul.Color pAzulColor = null) { //ensure call Create() first GameSpriteMan pMan = GameSpriteMan.GetInstance(); Debug.Assert(pMan != null); // add GameSprite to active list GameSprite pGameSprite = (GameSprite)pMan.baseAdd(); Debug.Assert(pGameSprite != null); // find the image by image name Image pImage = ImageMan.Find(imageName); Debug.Assert(pImage != null); // set new GameSprite pGameSprite.set(gameSpriteName, pImage, x, y, width, height, pAzulColor); return(pGameSprite); }