示例#1
0
        /// <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();
            }
        }
示例#2
0
 private bool RemoveVisibleTarget(PhysicsObj obj)
 {
     //Console.WriteLine($"{PhysicsObj.Name} ({PhysicsObj.ID:X8}).ObjectMaint.RemoveVisibleTarget({obj.Name})");
     return(VisibleTargets.Remove(obj.ID));
 }