예제 #1
0
파일: DungeonTile.cs 프로젝트: vogon/Zeplin
 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
파일: Sprite.cs 프로젝트: zumpiez/Zeplin
        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
파일: Sprite.cs 프로젝트: zumpiez/Zeplin
 public Sprite(Image sprite, AnimationScript animation)
     : this(sprite, new Transformation(), animation, null)
 {
 }
예제 #4
0
파일: Tile.cs 프로젝트: vogon/Zeplin
 public Tile(Sprite sprite, AnimationScript animation)
     : this(sprite, new Transformation(), animation, null)
 {
 }