Game Development Reference
In-Depth Information
public void Render()
{
Gl.glBegin(Gl.GL_LINE_LOOP);
{
Gl.glColor3f(1, 0, 0);
Gl.glVertex2f(bounds.Left, bounds.Top);
Gl.glVertex2f(bounds.Right, bounds.Top);
Gl.glVertex2f(bounds.Right, bounds.Bottom);
Gl.glVertex2f(bounds.Left, bounds.Bottom);
}
Gl.glEnd();
Gl.glEnable(Gl.GL_TEXTURE_2D);
}
public Vector GetPosition()
{
return new Vector(bounds.Location.X + _width, bounds.Location.
Y + 16, 0);
}
public void SetPosition(Vector value)
{
bounds = new RectangleF((float)value.X - _width, (float)value.
Y - _height, _width, _height);
}
}
PlatformEntity _pc = new PlatformEntity();
Input _input;
double _speed = 1600;
Vector _velocity = new Vector(0, 0, 0);
bool _jumping = false;
double _gravity = 0.75;
double _friction = 0.1;
public PlatfomerTestState(Input input)
{
_input = input;
}
#region IGameObject Members
Search WWH ::




Custom Search