daily update on 20230322 by nitload youmu, new geometry structure rewritten 70%

This commit is contained in:
Nitload
2023-03-22 20:32:17 +08:00
parent db2ca36fd7
commit eedab82f6e
66 changed files with 1382 additions and 785 deletions
+12 -3
View File
@@ -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);
}
}
}