private void OnDisappears(Entity entity)
{
var npc = entity as NPC;
if (npc == null)
return;
lock (_creatures)
_creatures.Remove(npc);
var delay = (this.DelayMin >= 0 && this.DelayMax > 0 ? RandomProvider.Get().Next(this.DelayMin, this.DelayMax + 1) : 0);
if (delay == 0)
this.SpawnOne();
else
Task.Delay(delay).ContinueWith(_ => this.SpawnOne());
}
}