This commit is contained in:
Nitload
2023-02-14 14:26:57 +08:00
parent b3e55ecfc7
commit 3762a2e5ce
19 changed files with 162 additions and 90 deletions
+13 -12
View File
@@ -1,5 +1,6 @@
using GLFWDotNet;
using StgSharp;
using StgSharp.Vector;
using System;
using System.Collections.Generic;
using System.Drawing;
@@ -13,11 +14,10 @@ namespace StgSharp
{
internal StgSharp.ContainerNode<INode> _id;
internal float _x;
internal float _y;
internal Vec2D _position;
public GetLocationHandler getXHandler;
public GetLocationHandler getYHandler;
internal GetLocationHandler getXHandler;
internal GetLocationHandler getYHandler;
ContainerNode<INode> INode.ID
{
@@ -26,17 +26,12 @@ namespace StgSharp
public float X
{
get
{
return getXHandler(Control.TimeLine.tickCounter);
}
get { return this._position.X; }
}
public float Y
{
get
{
return getYHandler(Control.TimeLine.tickCounter);
}
get { return this._position.Y; }
}
void INode.setID<T>(ContainerNode<T> id)
@@ -50,5 +45,11 @@ namespace StgSharp
throw new ArgumentException("Cannot set id twice!");
}
}
public void OnRender()
{
this.getXHandler.Invoke(Control.TimeLine.tickCounter);
this.getYHandler.Invoke(Control.TimeLine.tickCounter);
}
}
}