private void UpdateFogOfWarSystem() { //Entity.Transform.GetWorldTransformation(out var worldPos, out _, out _); var worldPos = Entity.Transform.WorldMatrix.TranslationVector; FogOfWarSubscriber.UpdateWorld(worldPos, fogDetectors.Select(a => a.Value.Pos).ToList()); }
public void RemoveSubscriber(FogOfWarSubscriber subscriber) { if (fogSubscribers.ContainsKey(subscriber.Name)) { fogSubscribers.Remove(subscriber.Name); Log.Debug($"Subscriber {subscriber.Name} has been removed from the fog of war system."); } }
public void AddSubscriber(FogOfWarSubscriber subscriber) { if (fogSubscribers.ContainsKey(subscriber.Name)) { return; } fogSubscribers.Add(subscriber.Name, subscriber); Log.Debug($"Subscriber {subscriber.Name} has been added to the fog of war system."); }