Beispiel #1
0
 public override void SetSeenBy(ExploringEntity entity)
 {
     base.SetSeenBy(entity);
     StackLog.Debug($"{entity} sees {this}");
     if (entity.Owner == MainBehaviour.Player)
     {
         SetVisible(true);
         foreach (var party in this.MovingEntities)
         {
             ((ClientParty)party).GetGameObject().SetActive(true);
         }
         if (this.StaticEntity is IGameObject)
         {
             ((IGameObject)this.StaticEntity).GetGameObject().SetActive(true);
         }
     }
 }
Beispiel #2
0
        public override void SetUnseenBy(ExploringEntity unexplorer)
        {
            base.SetUnseenBy(unexplorer);

            if (unexplorer.Owner != MainBehaviour.Player)
            {
                return;
            }

            if (!this.IsVisibleTo(MainBehaviour.Player))
            {
                SetVisible(false);
                foreach (var party in this.MovingEntities)
                {
                    ((ClientParty)party).GetGameObject().SetActive(false);
                }
                if (this.StaticEntity is IGameObject)
                {
                    ((IGameObject)this.StaticEntity).GetGameObject().SetActive(false);
                }
            }
        }