Adjust for the api
This commit is contained in:
parent
a3e655583b
commit
c06c70a3ff
4 changed files with 8 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
FileVersion = 1
|
FileVersion = 1
|
||||||
Dependencies = {corlib = "*", raylib-beef = "*", Theater-ECS = "*"}
|
Dependencies = {corlib = "*", Theater-ECS = "*", raylib-beef = "*"}
|
||||||
|
|
||||||
[Project]
|
[Project]
|
||||||
Name = "Theater-ECS-Example"
|
Name = "Theater-ECS-Example"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FileVersion = 1
|
FileVersion = 1
|
||||||
Projects = {Theater-ECS-Example = {Path = "."}, raylib-beef = {Path = "../../Program Files/BeefLang/BeefLibs/raylib-beef/raylib-beef"}, Theater-ECS = {Path = "../Theater-ECS"}}
|
Projects = {Theater-ECS-Example = {Path = "."}, Theater-ECS = {Path = "../Theater-ECS"}, raylib-beef = {Path = "../raylib-beef/raylib-beef"}}
|
||||||
|
|
||||||
[Workspace]
|
[Workspace]
|
||||||
StartupProject = "Theater-ECS-Example"
|
StartupProject = "Theater-ECS-Example"
|
||||||
|
|
|
@ -8,9 +8,11 @@ class MovementSystem : System
|
||||||
{
|
{
|
||||||
RegisterComponent<Position>(ecs);
|
RegisterComponent<Position>(ecs);
|
||||||
RegisterComponent<Velocity>(ecs);
|
RegisterComponent<Velocity>(ecs);
|
||||||
|
|
||||||
|
Run_2 = => RunFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Run(void* pos, void* vel)
|
public static void RunFunction(void* pos, void* vel)
|
||||||
{
|
{
|
||||||
var mPos = ((Position*)pos);
|
var mPos = ((Position*)pos);
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,11 @@ class RendererSystem : System
|
||||||
{
|
{
|
||||||
RegisterComponent<Position>(ecs);
|
RegisterComponent<Position>(ecs);
|
||||||
RegisterComponent<Sprite>(ecs);
|
RegisterComponent<Sprite>(ecs);
|
||||||
|
|
||||||
|
Run_2 = => RunFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Run(void* pos, void* sprite)
|
public static void RunFunction(void* pos, void* sprite)
|
||||||
{
|
{
|
||||||
var toDraw = (Position*)pos;
|
var toDraw = (Position*)pos;
|
||||||
Raylib.DrawTexture(((Sprite*)sprite).sprite, (.)toDraw.x, (.)toDraw.y, Raylib.WHITE);
|
Raylib.DrawTexture(((Sprite*)sprite).sprite, (.)toDraw.x, (.)toDraw.y, Raylib.WHITE);
|
||||||
|
|
Loading…
Add table
Reference in a new issue