예제 #1
0
        public void SendGyroTorqueRequest(Vector3 torque)
        {
            var msg = new OverrideGyroTorqueMsg();

            msg.EntityId = m_block.EntityId;
            msg.Torque   = torque;

            Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success);
        }
예제 #2
0
        static void OverrideGyroTorqueSuccess(ref OverrideGyroTorqueMsg msg, MyNetworkClient sender)
        {
            MyEntity entity;

            MyEntities.TryGetEntityById(msg.EntityId, out entity);
            var block = entity as MyGyro;

            if (block != null)
            {
                block.SetGyroTorque(msg.Torque);
            }
        }
예제 #3
0
        static void OverrideGyroTorqueSuccess(ref OverrideGyroTorqueMsg msg, MyNetworkClient sender)
        {
            MyEntity entity;

            MyEntities.TryGetEntityById(msg.EntityId, out entity);
            var block = entity as MyGyro;

            if (block != null)
            {
                block.SetGyroTorque(msg.Torque);
                if (Sync.IsServer)
                {
                    Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId, MyTransportMessageEnum.Success);
                }
            }
        }
예제 #4
0
 static void OverrideGyroTorqueSuccess(ref OverrideGyroTorqueMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     var block = entity as MyGyro;
     if (block != null)
     {
         block.SetGyroTorque(msg.Torque);
         if (Sync.IsServer)
         {
             Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId, MyTransportMessageEnum.Success);
         }
     }
 }
예제 #5
0
        public void SendGyroTorqueRequest(Vector3 torque)
        {
            var msg = new OverrideGyroTorqueMsg();
            msg.EntityId = m_block.EntityId;
            msg.Torque = torque;

            Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Success);
        }
예제 #6
0
 static void OverrideGyroTorqueSuccess(ref OverrideGyroTorqueMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     var block = entity as MyGyro;
     if (block != null)
         block.SetGyroTorque(msg.Torque);
 }