Ejemplo n.º 1
0
        public void SendChangeGyroPowerRequest(float gyroPower)
        {
            var msg = new ChangeGyroPowerMsg();
            msg.EntityId = m_block.EntityId;
            msg.GyroPower = gyroPower;

            Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Success);
        }
Ejemplo n.º 2
0
 static void ChangeGyroPowerSuccess(ref ChangeGyroPowerMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     var block = entity as MyGyro;
     if (block != null)
         block.GyroPower = msg.GyroPower;
 }
Ejemplo n.º 3
0
        public void SendChangeGyroPowerRequest(float gyroPower)
        {
            var msg = new ChangeGyroPowerMsg();

            msg.EntityId  = m_block.EntityId;
            msg.GyroPower = gyroPower;

            Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success);
        }
Ejemplo n.º 4
0
        static void ChangeGyroPowerSuccess(ref ChangeGyroPowerMsg msg, MyNetworkClient sender)
        {
            MyEntity entity;

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

            if (block != null)
            {
                block.GyroPower = msg.GyroPower;
            }
        }
Ejemplo n.º 5
0
 static void ChangeGyroPowerSuccess(ref ChangeGyroPowerMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     var block = entity as MyGyro;
     if (block != null)
     {
         block.GyroPower = msg.GyroPower;
         if (Sync.IsServer)
         {
             Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId, MyTransportMessageEnum.Success);
         }
     }
 }
Ejemplo n.º 6
0
        static void ChangeGyroPowerSuccess(ref ChangeGyroPowerMsg msg, MyNetworkClient sender)
        {
            MyEntity entity;

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

            if (block != null)
            {
                block.GyroPower = msg.GyroPower;
                if (Sync.IsServer)
                {
                    Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId, MyTransportMessageEnum.Success);
                }
            }
        }