Exemple #1
0
        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);
        }