예제 #1
0
        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());
        }
예제 #2
0
 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.");
     }
 }
예제 #3
0
        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.");
        }