public DungeonTile(Sprite sprite, Rectangle extent, TileType type, AnimationScript script) : base(sprite, script) { SubRect = extent; _extent = extent; _type = type; if (script != null) script.Loop = true; // hack: this really shouldn't beee heeeeere FrameSize = new Point(24, 24); }
public Tile(Sprite sprite, Transformation transformation, AnimationScript animation, SATCollisionVolume collider) { this.Sprite = sprite; SubRect = new Rectangle(0, 0, sprite.Image.Width, sprite.Image.Height); this.Transformation = new Transformation(transformation); this.AnimationScript = animation; this.CollisionVolume = collider; OnDraw += this.Draw; if (CollisionVolume != null) { OnUpdate += delegate(GameTime time) { collider.TransformCollisionVolume(this.Transformation); }; } }
public Tile(Sprite sprite, Transformation transformation, SATCollisionVolume collider) : this(sprite, transformation, null, collider) { }
public Tile(Sprite sprite, AnimationScript animation) : this(sprite, new Transformation(), animation, null) { }
/// <summary> /// Constructs a tile with a sprite and a transformation /// </summary> /// <param name="sprite"></param> /// <param name="transformation"></param> public Tile(Sprite sprite, Transformation transformation) : this(sprite, transformation, null, null) { }
public Tile(Sprite sprite) : this(sprite, new Transformation(), null, null) { }
/// <summary> /// Creates a MenuItem with a Sprite and Transformation /// </summary> /// <param name="sprite"></param> /// <param name="transformation"></param> public MenuItem(Sprite sprite, Transformation transformation) { this.Sprite = sprite; this.Transformation = transformation; }
public DungeonTile(Sprite sprite, Rectangle extent, TileType type) : this(sprite, extent, type, (AnimationScript)null) { }
/// <summary> /// An Actor can be drawn on screen, translated around arbitrarily, collide with other game objects, and process update logic every frame. /// </summary> /// <param name="sprite">The artwork the actor will use during Draw.</param> /// <param name="transformation">Positioning information.</param> public Actor(Sprite sprite, Transformation transformation) : this(sprite, transformation, new SATCollisionVolume()) { }
/// <summary> /// An Actor can be drawn on screen, translated around arbitrarily, collide with other game objects, and process update logic every frame. /// </summary> /// <param name="sprite">The artwork the actor will use during Draw.</param> /// <param name="transformation">Positioning information.</param> /// <param name="collider">A collision shape that mirrors the transformation.</param> public Actor(Sprite sprite, Transformation transformation, SATCollisionVolume collider) : base(sprite, transformation, collider) { }