Spawner.Spawn now requires in param
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details

pull/13/head
Evan Hemsley 2020-07-21 18:05:03 -07:00
parent 1d458e3563
commit d661ed5b17
2 changed files with 3 additions and 3 deletions

View File

@ -21,12 +21,12 @@ namespace Encompass
public override void Update(double dt)
{
foreach (var message in ReadMessages<TMessage>())
foreach (ref readonly var message in ReadMessages<TMessage>())
{
Spawn(message);
}
}
protected abstract void Spawn(TMessage message);
protected abstract void Spawn(in TMessage message);
}
}

View File

@ -23,7 +23,7 @@ namespace Tests
[Writes(typeof(TestComponent))]
class TestSpawner : Spawner<SpawnMessageA>
{
protected override void Spawn(SpawnMessageA message)
protected override void Spawn(in SpawnMessageA message)
{
resultEntity = CreateEntity();
SetComponent(resultEntity, new TestComponent());