Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        public Sprite(Image sprite, Transformation transformation, AnimationScript animation, SATCollisionVolume collider)
        {
            this.Image = sprite;
            SubRect = new Rectangle(0, 0, sprite.Texture.Width, sprite.Texture.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); };
            }
        }
Ejemplo n.º 3
0
 public Sprite(Image sprite, AnimationScript animation)
     : this(sprite, new Transformation(), animation, null)
 {
 }
Ejemplo n.º 4
0
Archivo: Tile.cs Proyecto: vogon/Zeplin
 public Tile(Sprite sprite, AnimationScript animation)
     : this(sprite, new Transformation(), animation, null)
 {
 }