public void AddWatch(Entity entity, bool isVision) { if (entity == null) { return; } entity = entity.GetRoot(); if (entity.Get <FactionComponent>().Faction == Faction) { return; } var watcher = GetWatchTarget(entity); if (watcher == null) { watcher = new WatchTarget(entity); WatchTargets.Add(watcher); } watcher.LastSensedTurnCount = 0; watcher.LastSensedPos = entity.Get <GridPosition>(); if (watcher.Seen && !isVision) { return; } watcher.Seen = isVision; }
public void RemoveWatch(WatchTarget watcher) { WatchTargets.Remove(watcher); }