-
Notifications
You must be signed in to change notification settings - Fork 37
/
ATile.cs
36 lines (32 loc) · 863 Bytes
/
ATile.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Linq;
using xTile.Layers;
using xTile.Tiles;
namespace Entoarox.DynamicDungeons
{
internal struct ATile : ITile
{
/*********
** Accessors
*********/
public int X { get; set; }
public int Y { get; set; }
public Layer Layer { get; set; }
public STile[] Frames;
public int Interval;
/*********
** Public methods
*********/
public ATile(int x, int y, Layer layer, STile[] frames, int interval)
{
this.X = x;
this.Y = y;
this.Layer = layer;
this.Frames = frames;
this.Interval = interval;
}
public Tile Get()
{
return new AnimatedTile(this.Layer, this.Frames.Select(tile => (StaticTile)tile.Get()).ToArray(), this.Interval);
}
}
}