Пример #1
0
        public static void SendDamagedEvent(GameObject damagedPedGo, GameObject attackingPedGo, float damageAmount)
        {
            NetStatus.ThrowIfNotOnServer();

            foreach (var p in Player.AllPlayersEnumerable)
            {
                p.GetComponent <PedSync>().TargetDamagedEvent(p.connectionToClient, damagedPedGo, attackingPedGo, damageAmount);
            }
        }
Пример #2
0
        public void InitializeOnServer(uint vehicleNetId, int vehicleModelId, int[] vehicleColors, string frameName, float mass, Rigidbody rigidbody)
        {
            NetStatus.ThrowIfNotOnServer();

            m_net_vehicleNetId   = vehicleNetId;
            m_net_vehicleModelId = vehicleModelId;
            m_net_vehicleColors  = VehicleController.SerializeColors(vehicleColors);
            m_net_frameName      = frameName;
            m_net_mass           = mass;

            this.NetworkRigidBody.Rigidbody = rigidbody;
            this.NetworkRigidBody.UpdateServer();
        }
Пример #3
0
 public static bool IsClientActive()
 {
     return ! NetStatus.IsClientDisconnected ();
 }
Пример #4
0
 /// <summary>
 /// Is client connected ?
 /// TODO: This method should be corrected to return: is client active.
 /// </summary>
 public static bool IsClient()
 {
     return NetStatus.IsClientConnected();
 }