コード例 #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)
 {
 }