コード例 #1
0
ファイル: TMXLevel.cs プロジェクト: swiebertjee/Elliptica
 //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);
 }
コード例 #2
0
        public Player1()
            : base("Blackline.png")
        {
            /*Animation here*/

            animSpritePlayer = new AnimSprite("Red.png", 1, 1);
            AddChild(animSpritePlayer);
        }
コード例 #3
0
ファイル: Item.cs プロジェクト: swiebertjee/Elliptica
 //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;
 }