Exemplo n.º 1
0
 public HeartObject(Room room, Vector2 pos) : base(room, pos, new Vector2(0, 0), new Vector2(24, 24))
 {
     Sprite       = new SpriteData();
     Sprite.Size  = new Vector2(24, 24);
     Sprite.Layer = 1;
     heartSprite  = null;
     AssetManager.RequestTexture("heart", (frames) =>
     {
         heartSprite = frames;
         Sprite.Change(heartSprite);
     });
 }
Exemplo n.º 2
0
 public JumpResetObject(Room room, Vector2 pos) : base(room, pos, new Vector2(0, 0), new Vector2(32, 32))
 {
     Hitbox        = new Rectangle(8, 8, 16, 16);
     IsActive      = true;
     stepsRemaning = 0;
     Sprite        = new SpriteData();
     Sprite.Size   = new Vector2(24, 24);
     AssetManager.RequestTexture("jumpReset", (frames) =>
     {
         Sprite.Change(frames);
         Sprite.Speed = 0.5f;
     });
 }
Exemplo n.º 3
0
 public JumpParticleObject(Room room, Vector2 pos) : base(room, pos, new Vector2(0, 0), new Vector2(30, 6))
 {
     Sprite       = new SpriteData();
     Sprite.Size  = new Vector2(30, 6);
     Sprite.Layer = 1;
     jumpSprite   = null;
     lifetime     = 20;
     AssetManager.RequestTexture("jumpParticle", (frames) =>
     {
         jumpSprite = frames;
         Sprite.Change(jumpSprite);
     });
     Sprite.Offset = new Vector2(0, 0);
 }
Exemplo n.º 4
0
        public YinYangObject(Room room, Vector2 pos) : base(room, pos, new Vector2(0, 0), new Vector2(16, 16))
        {
            Sprite        = new SpriteData();
            Sprite.Size   = new Vector2(16, 16);
            Sprite.Layer  = 1;
            Sprite.Speed  = 0.2f;
            yinyangSprite = null;
            AssetManager.RequestTexture("yinYang", (frames) =>
            {
                yinyangSprite = frames;
                Sprite.Change(yinyangSprite);
            });

            Sprite.Offset = new Vector2(4, 4);
        }
Exemplo n.º 5
0
        public CrosshairObject(Room room) : base(room, new Vector2(0, 0), new Vector2(0, 0), new Vector2(24, 24))
        {
            Sprite          = new SpriteData();
            Sprite.Size     = new Vector2(24, 24);
            Sprite.Layer    = 1;
            Sprite.Speed    = 0.1f;
            crosshairSprite = null;
            AssetManager.RequestTexture("crosshair", (frames) =>
            {
                crosshairSprite = frames;
                Sprite.Change(crosshairSprite);
            });

            Sprite.Offset = new Vector2(6, 6);
        }
Exemplo n.º 6
0
 public NoteObject(Room room, Vector2 pos) : base(room, pos, new Vector2(0, 0), new Vector2(24, 24))
 {
     ShowTextWindow         = false;
     Sprite                 = new SpriteData();
     Sprite.Size            = new Vector2(24, 24);
     textWindowSprite       = new SpriteData();
     textWindowSprite.Size  = new Vector2(512, 128);
     textWindowSprite.Layer = 0.96f;
     drawTextWindowFrom     = new Vector2((Room.Game.GraphicsDevice.Viewport.Width - textWindowSprite.Size.X) / 2, textBoxTopPadding);
     AssetManager.RequestTexture("note", (frames) =>
     {
         Sprite.Change(frames);
     });
     AssetManager.RequestTexture("textWindow", (frames) =>
     {
         textWindowSprite.Change(frames);
     });
 }
Exemplo n.º 7
0
 public FairyObject(Room room, Vector2 pos) : base(room, pos, new Vector2(0, 0), new Vector2(32, 32))
 {
     life           = 3;
     cooldown       = 60;
     moving         = true;
     Position      -= new Vector2(0, 16);
     facingRight    = true;
     Sprite         = new SpriteData();
     Sprite.Size    = new Vector2(32, 32);
     animationindex = -16;
     goingUp        = true;
     Hitbox         = new Rectangle(0, 0, 32, 48);
     Sprite.Layer   = Layer;
     fairySprite    = null;
     AssetManager.RequestTexture("fairy", (frames) =>
     {
         fairySprite = frames;
         Sprite.Change(fairySprite);
         Sprite.Speed = 1f / 10;
     });
 }