Change to fit new api
This commit is contained in:
parent
e63aab283b
commit
a3e655583b
2 changed files with 4 additions and 4 deletions
|
@ -6,8 +6,8 @@ struct MovingBall : IArchetypeable
|
||||||
{
|
{
|
||||||
public void Instantiate(ECS ecs, Entity e)
|
public void Instantiate(ECS ecs, Entity e)
|
||||||
{
|
{
|
||||||
ecs.Components.AddComponentToEntity(e, ecs.Components.GetId(typeof(Position).GetFullName(.. scope .())), &Position());
|
ecs.Components.AddToEntity(e, ecs.Components.GetId(typeof(Position).GetFullName(.. scope .())), &Position());
|
||||||
ecs.Components.AddComponentToEntity(e, ecs.Components.GetId(typeof(Velocity).GetFullName(.. scope .())), &Velocity());
|
ecs.Components.AddToEntity(e, ecs.Components.GetId(typeof(Velocity).GetFullName(.. scope .())), &Velocity());
|
||||||
ecs.Components.AddComponentToEntity(e, ecs.Components.GetId(typeof(Sprite).GetFullName(.. scope .())), &Sprite());
|
ecs.Components.AddToEntity(e, ecs.Components.GetId(typeof(Sprite).GetFullName(.. scope .())), &Sprite());
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -25,7 +25,7 @@ class Program
|
||||||
|
|
||||||
uint64 entityCounter = 0;
|
uint64 entityCounter = 0;
|
||||||
|
|
||||||
for(int32 i < 50000)
|
for(int32 i < 50)
|
||||||
{
|
{
|
||||||
entityCounter++;
|
entityCounter++;
|
||||||
ecs.Entities.Create(MovingBall());
|
ecs.Entities.Create(MovingBall());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue