//adding an animation sprite with the right frame from the level private void AddSprite(int frame) { animSprite = new AnimSprite("tilesheet1.png", 9, 5); animSprite.SetFrame(frame); AddChild(animSprite); background.Add(animSprite); }
public Player1() : base("Blackline.png") { /*Animation here*/ animSpritePlayer = new AnimSprite("Red.png", 1, 1); AddChild(animSpritePlayer); }
//adds a visual to this object void addGfx(int itemID) { //making the anim sprite(this is where the spritesheet is put) gfx = new AnimSprite("tiles.png", ITEMCOUNT, 1); AddChild(gfx); SetOrigin(0, height); gfx.SetOrigin(0, gfx.height); SetItemType(itemID); alpha = 0; }