public Hitspark(Vector2 Position, Texture2D texture) { Offset = new Vector2(-10, 25); this.Position = Position + Offset; Animation animation = new Animation(texture, 0.025f, false); animation.autoPopulate(new Vector2(102, 60), 10); sprite.PlayAnimation(animation); Scale = 1.6f; }
public LootItem(Vector2 Position, int Level) { this.Position = Position; this.item = GenerateItem(Level); animation = new Animation(item.Icon.texture, Constants.DefaultFrameTime, true); animation.autoPopulate(new Vector2(32, 32), 5); localBounds = new Rectangle(0, 0, item.Icon.texture.Width, item.Icon.texture.Height); sprite.PlayAnimation(animation); onTouch += new EventHandler(PickUpItem); }