Exemple #1
0
 /// <inheritdoc />
 public void Tick()
 {
     //We check here if an actor is dead when they should be a known entity.
     foreach (var a in EntityDataContainer.EnumerateWithGuid(KnownEntities, EntityType.Player))
     {
         //Kill the actor gracefully if the player connection is gone
         //yet we're still a known entity.
         if (!ConnectionServiceMappable[a.EntityGuid].isConnected)
         {
             a.ComponentValue.Tell(PoisonPill.Instance);
         }
     }
 }
Exemple #2
0
        /// <inheritdoc />
        public void Tick()
        {
            //We check here if an actor is dead when they should be a known entity.
            foreach (var a in EntityDataContainer.EnumerateWithGuid(KnownEntities, EntityType.Player))
            {
                if (a.ComponentValue.IsNobody())
                {
                    if (Logger.IsInfoEnabled)
                    {
                        Logger.Info($"Found Stopped Actor: {a.EntityGuid}");
                    }

                    //Now the entity will begin to be cleaned up.
                    EntityDestructionPublisher.PublishEvent(this, new EntityDeconstructionRequestedEventArgs(a.EntityGuid));
                }
            }
        }