示例#1
0
        public void SendChangeRangeRequest(float range)
        {
            var msg = new ChangeRangeMsg();

            msg.EntityId = m_turret.EntityId;
            msg.Range    = range;

            Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request);
        }
示例#2
0
        static void ChangeRangeRequest(ref ChangeRangeMsg 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 ChangeRangeSuccess(ref ChangeRangeMsg msg, MyNetworkClient sender)
        {
            MyEntity entity;

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

            if (turret != null)
            {
                turret.ShootingRange = msg.Range;
            }
        }
 static void ChangeRangeSuccess(ref ChangeRangeMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     var turret = entity as MyLargeTurretBase;
     if (turret != null)
     {
         turret.ShootingRange = msg.Range;
     }
 }
 static void ChangeRangeRequest(ref ChangeRangeMsg msg, MyNetworkClient sender)
 {
     MyEntity entity;
     MyEntities.TryGetEntityById(msg.EntityId, out entity);
     if (entity is MyLargeTurretBase)
     {
         Sync.Layer.SendMessageToAllAndSelf(ref msg, MyTransportMessageEnum.Success);
     }
 }
        public void SendChangeRangeRequest(float range)
        {
            var msg = new ChangeRangeMsg();

            msg.EntityId = m_turret.EntityId;
            msg.Range = range;

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