コード例 #1
0
 static void OnSetVelocity(MySyncPistonBase sync, ref VelocityMsg msg, MyNetworkClient sender)
 {
     sync.Entity.Velocity = msg.Velocity;
     if (Sync.IsServer)
     {
         Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId);
     }
 }
コード例 #2
0
        public void SetVelocity(float v)
        {
            var msg = new VelocityMsg();

            msg.EntityId = Entity.EntityId;
            msg.Velocity = v;

            OnSetVelocity(this, ref msg, Sync.Clients.LocalClient);
            Sync.Layer.SendMessageToAllAndSelf(ref msg);
        }
コード例 #3
0
 static void OnSetVelocity(MySyncPistonBase sync, ref VelocityMsg msg, MyNetworkClient sender)
 {
     sync.Entity.Velocity = msg.Velocity;
 }
コード例 #4
0
        public void SetVelocity(float v)
        {
            var msg = new VelocityMsg();
            msg.EntityId = Entity.EntityId;
            msg.Velocity = v;

            OnSetVelocity(this, ref msg, Sync.Clients.LocalClient);
            Sync.Layer.SendMessageToAllAndSelf(ref msg);
        }
コード例 #5
0
 static void OnSetVelocity(MySyncPistonBase sync, ref VelocityMsg msg, MyNetworkClient sender)
 {
     sync.Entity.Velocity = msg.Velocity;
     if (Sync.IsServer)
     {
         Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId);
     }
 }
コード例 #6
0
 public static string ToYAMLString(VelocityMsg msg)
 {
     return(msg.ToYAMLString());
 }
コード例 #7
0
 static void OnSetVelocity(MySyncPistonBase sync, ref VelocityMsg msg, MyNetworkClient sender)
 {
     sync.Entity.Velocity = msg.Velocity;
 }