add SomeMessageWithEntity method to Engine
parent
fada124b39
commit
4f75aeebf1
|
@ -53,6 +53,11 @@ namespace Encompass
|
||||||
return Lookup<TMessage>().WithEntity(entityID);
|
return Lookup<TMessage>().WithEntity(entityID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool SomeWithEntity<TMessage>(int entityID) where TMessage : struct, IMessage, IHasEntity
|
||||||
|
{
|
||||||
|
return Lookup<TMessage>().SomeWithEntity(entityID);
|
||||||
|
}
|
||||||
|
|
||||||
public void ProcessDelayedMessages(double dilatedDelta, double realtimeDelta)
|
public void ProcessDelayedMessages(double dilatedDelta, double realtimeDelta)
|
||||||
{
|
{
|
||||||
foreach (var store in Stores.Values)
|
foreach (var store in Stores.Values)
|
||||||
|
|
|
@ -93,6 +93,11 @@ namespace Encompass
|
||||||
return entityToMessage.ContainsKey(entityID) ? entityToMessage[entityID] : System.Linq.Enumerable.Empty<TMessage>();
|
return entityToMessage.ContainsKey(entityID) ? entityToMessage[entityID] : System.Linq.Enumerable.Empty<TMessage>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool SomeWithEntity(int entityID)
|
||||||
|
{
|
||||||
|
return entityToMessage.ContainsKey(entityID) && entityToMessage[entityID].Count > 0;
|
||||||
|
}
|
||||||
|
|
||||||
public override void Clear()
|
public override void Clear()
|
||||||
{
|
{
|
||||||
store.Clear();
|
store.Clear();
|
||||||
|
|
|
@ -658,6 +658,11 @@ namespace Encompass
|
||||||
return messageManager.WithEntity<TMessage>(entity.ID);
|
return messageManager.WithEntity<TMessage>(entity.ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected bool SomeMessageWithEntity<TMessage>(Entity entity) where TMessage : struct, IMessage, IHasEntity
|
||||||
|
{
|
||||||
|
return messageManager.SomeWithEntity<TMessage>(entity.ID);
|
||||||
|
}
|
||||||
|
|
||||||
internal void CheckAndUpdateTracking(int entityID)
|
internal void CheckAndUpdateTracking(int entityID)
|
||||||
{
|
{
|
||||||
if (_trackedEntities.Contains(entityID) && !entityQuery.CheckEntity(entityID, componentManager.ExistingBits))
|
if (_trackedEntities.Contains(entityID) && !entityQuery.CheckEntity(entityID, componentManager.ExistingBits))
|
||||||
|
|
|
@ -56,5 +56,10 @@ namespace Encompass
|
||||||
{
|
{
|
||||||
return messageStore.WithEntity<TMessage>(entityID);
|
return messageStore.WithEntity<TMessage>(entityID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal bool SomeWithEntity<TMessage>(int entityID) where TMessage : struct, IMessage, IHasEntity
|
||||||
|
{
|
||||||
|
return messageStore.SomeWithEntity<TMessage>(entityID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue