/// <summary> /// Called when a monster goes back to sleep /// </summary> public void ClearRetaliateTargets() { rwLock.EnterWriteLock(); try { // remove retaliate targets from visible targets foreach (var retaliateTarget in RetaliateTargets) { VisibleTargets.Remove(retaliateTarget.Key); } RetaliateTargets.Clear(); } finally { rwLock.ExitWriteLock(); } }
private bool RemoveVisibleTarget(PhysicsObj obj) { //Console.WriteLine($"{PhysicsObj.Name} ({PhysicsObj.ID:X8}).ObjectMaint.RemoveVisibleTarget({obj.Name})"); return(VisibleTargets.Remove(obj.ID)); }