daily update on 20230322 by nitload youmu, new geometry structure rewritten 70%
This commit is contained in:
@@ -7,11 +7,14 @@ namespace StgSharp
|
||||
{
|
||||
public class Entity:INode<Entity>
|
||||
{
|
||||
internal vec2d _pos;
|
||||
internal Point _pos;
|
||||
internal IGeometry _collisionBox;
|
||||
internal Sensor<IGeometry> _collisionSensor;
|
||||
internal ContainerNode<Entity> _id;
|
||||
|
||||
internal String _texture;
|
||||
internal Point _position;
|
||||
internal Point _basePoint;
|
||||
internal GetLocationHandler _movHandler;
|
||||
|
||||
public IGeometry CollisionBox
|
||||
{
|
||||
@@ -53,7 +56,7 @@ namespace StgSharp
|
||||
|
||||
public void SetLocation(Point p)
|
||||
{
|
||||
|
||||
_pos = p;
|
||||
}
|
||||
|
||||
void INode<Entity>.setID<T>(ContainerNode<T> id)
|
||||
@@ -67,5 +70,11 @@ namespace StgSharp
|
||||
throw new ArgumentException("Cannot set id twice!");
|
||||
}
|
||||
}
|
||||
|
||||
public void OnRender()
|
||||
{
|
||||
_position._position = _movHandler.Invoke(_basePoint._position, Control.TimeLine.tickCounter);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user