63 lines
1.4 KiB
C#
63 lines
1.4 KiB
C#
using StgSharp.Math;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace StgSharp
|
|
{
|
|
public class Player : IEntity
|
|
{
|
|
internal IGeometry _collisionBox;
|
|
internal Sensor _collisionSensor;
|
|
internal string _texture;
|
|
internal Vec2D _position;
|
|
private ContainerNode<INode> _id;
|
|
|
|
IGeometry IEntity.CollisionBox
|
|
{
|
|
get { return this._collisionBox; }
|
|
set { this._collisionBox = value; }
|
|
}
|
|
Sensor IEntity.CollisionSensor
|
|
{
|
|
get { return this._collisionSensor; }
|
|
set { this._collisionSensor = value; }
|
|
}
|
|
string IEntity.Texture
|
|
{
|
|
get { return this._texture; }
|
|
set { this._texture = value; }
|
|
}
|
|
Vec2D IEntity.Location
|
|
{
|
|
get { return this._position; }
|
|
}
|
|
|
|
ContainerNode<INode> INode.ID
|
|
{
|
|
get { return _id; }
|
|
}
|
|
|
|
public void SetLocation(Point p)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
void INode.setID<T>(ContainerNode<T> id)
|
|
{
|
|
if (id == null)
|
|
{
|
|
_id = id as ContainerNode<INode>;
|
|
}
|
|
else
|
|
{
|
|
throw new ArgumentException("Cannot set id twice!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|