コード例 #1
0
        public override void EntityReceived(BoltEntity entity)
        {
            if (entity.StateIs <IPlayerState>() && GameSetup.IsMpServer)
            {
                NetworkManager.SendText("IIA champion approaches... \n" + entity.GetState <IPlayerState>().name, NetworkManager.Target.Everyone);
            }

            base.EntityReceived(entity);
        }
コード例 #2
0
 public override void EntityDetached(BoltEntity entity)
 {
     if (entity != null)
     {
         if (entity.StateIs <IPlayerState>() && TheForest.Utils.Scene.SceneTracker && GameSetup.IsMpServer)
         {
             if (entity.source.udpConnection.IsConnected)
             {
                 NetworkManager.SendText("II" + entity.GetState <IPlayerState>().name + " has died", NetworkManager.Target.Everyone);
             }
             else
             {
                 ModdedPlayer.instance.SendLeaveMessage(entity.GetState <IPlayerState>().name);
             }
         }
     }
     base.EntityDetached(entity);
 }
コード例 #3
0
        public override void Connected(BoltConnection connection)
        {
            NetworkManager.SendText("IIA champion approaches", NetworkManager.Target.Everyone);

            base.Connected(connection);
        }