Sub classes are ugly as hell.

This commit is contained in:
high 2011-06-14 19:28:20 -04:00
parent a6f168115a
commit f233ef82e5
5 changed files with 140 additions and 145 deletions

View file

@ -29,12 +29,33 @@ namespace TShockAPI
public Group Group { get; set; }
public bool ReceivedInfo { get; set; }
public int Index {get;private set;}
public Player Player
public int Index { get; private set; }
/// <summary>
/// Terraria Player
/// </summary>
public Player TPlayer
{
get { return Main.player[Index]; }
}
public float X
{
get { return TPlayer.position.X; }
}
public float Y
{
get { return TPlayer.position.Y; }
}
public int TileX
{
get { return (int)(TPlayer.position.X / 16); }
}
public int TileY
{
get { return (int)(TPlayer.position.Y / 16); }
}
public TSPlayer(int ply)
{
TilesDestroyed = new Dictionary<TShock.Position, Tile>();