示例#1
0
        public void SendChangeTargetingRequest(MyTurretTargetFlags flags)
        {
            var msg = new ChangeTargetingMsg();

            msg.EntityId    = m_turret.EntityId;
            msg.TargetFlags = flags;

            Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request);
        }
示例#2
0
        static void ChangeTargetingRequest(ref ChangeTargetingMsg msg, MyNetworkClient sender)
        {
            MyEntity entity;

            MyEntities.TryGetEntityById(msg.EntityId, out entity);
            if (entity is MyLargeTurretBase)
            {
                Sync.Layer.SendMessageToAllAndSelf(ref msg, MyTransportMessageEnum.Success);
            }
        }
示例#3
0
        static void ChangeTargetingSuccess(ref ChangeTargetingMsg msg, MyNetworkClient sender)
        {
            MyEntity entity;

            MyEntities.TryGetEntityById(msg.EntityId, out entity);
            var turret = entity as MyLargeTurretBase;

            if (turret != null)
            {
                turret.TargetFlags = msg.TargetFlags;
            }
        }
 static void ChangeTargetingSuccess(ref ChangeTargetingMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     var turret = entity as MyLargeTurretBase;
     if (turret != null)
     {
         turret.TargetFlags = msg.TargetFlags;
     }
 }
 static void ChangeTargetingRequest(ref ChangeTargetingMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     if (entity is MyLargeTurretBase)
     {
         Sync.Layer.SendMessageToAllAndSelf(ref msg, MyTransportMessageEnum.Success);
     }
 }
        public void SendChangeTargetingRequest(MyTurretTargetFlags flags)
        {
            var msg = new ChangeTargetingMsg();

            msg.EntityId = m_turret.EntityId;
            msg.TargetFlags = flags;

            Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request);
        }