add World.ClearMessages

pull/6/head
cosmonaut 2023-11-15 15:10:56 -08:00
parent 523b6e3ef7
commit f849db955c
1 changed files with 6 additions and 0 deletions

View File

@ -391,6 +391,12 @@ namespace MoonTools.ECS
return MessageIndex[typeId].First<T>();
}
public void ClearMessages<T>() where T : unmanaged
{
var typeId = GetMessageTypeId<T>();
MessageIndex[typeId].Clear();
}
// TODO: temporary component storage?
public void FinishUpdate()
{