コード例 #1
0
 public void ExecuteServerCFunc(CFuncMethod cfuncMethod, string command)
 {
     if (cfuncMethod.cfunc.isServer)
     {
         rpc_Server_ExecuteCFunc.Invoke(command);
     }
 }
コード例 #2
0
 public void PossessPlayerPawn(Player playerPawn)
 {
     if (playerPawn != this.playerPawn)
     {
         playerPawn.team = team;
         Owner_SetPlayerPawn(playerPawn);
         rpc_Owner_SetPlayerPawn.Invoke(playerPawn);
     }
 }
コード例 #3
0
 public override void ConsolePrint(LogType logType, string message)
 {
     if (!string.IsNullOrEmpty(message))
     {
         if (isLocalPlayer || (message.Length < 1024))
         {
             rpc_Owner_ConsolePrint.Invoke((byte)logType, message);
         }
     }
 }
コード例 #4
0
        public override void OnLevelStart()
        {
            base.OnLevelStart();
            GameManager.instance.CloseLoadingScreen();
            GameManager.instance.StartPlayOnAwakeSounds();
            gameState.hud.OnLevelStart();
            _camera           = Camera.main;
            _cameraController = new CameraController(_camera, GameManager.instance.clientData.cameraDataCombat, GameManager.instance.clientData.cameraDataExplore);
            rpc_Server_ClientHasLoaded.Invoke();

            var sky = GameObject.FindObjectOfType <EnviroSky>();

            if (sky != null)
            {
                sky.Player       = playerPawn.go;
                sky.PlayerCamera = _camera;
            }
        }
コード例 #5
0
 public void RemovePlayerFromTeam(PlayerState player)
 {
     NetMulticast_RemovePlayerFromTeam(player);
     rpc_NetMulticast_RemovePlayerFromTeam.Invoke(player);
 }
コード例 #6
0
 public void AddPlayerToTeam(PlayerState player)
 {
     NetMulticast_AddPlayerToTeam(player);
     rpc_NetMulticast_AddPlayerToTeam.Invoke(player);
 }
コード例 #7
0
 public new void Owner_HUDDisplaySubtitle(string key, float stayTime)
 {
     rpc_Owner_HUDDisplaySubtitle.Invoke(key, stayTime);
 }
コード例 #8
0
 public void SetPermissionLevel(int level)
 {
     Multicast_SetPermissionLevel(level);
     rpc_Multicast_SetPermissionLevel.Invoke(level);
 }
コード例 #9
0
 public void SayTeam(string text)
 {
     rpc_Server_SayTeam.Invoke(text);
 }
コード例 #10
0
 public void Say(string text)
 {
     rpc_Server_Say.Invoke(text);
 }