Пример #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);
 }
Пример #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); };
            }
        }
Пример #3
0
 public Sprite(Image sprite, AnimationScript animation)
     : this(sprite, new Transformation(), animation, null)
 {
 }
Пример #4
0
 public Tile(Sprite sprite, AnimationScript animation)
     : this(sprite, new Transformation(), animation, null)
 {
 }