예제 #1
0
 public EntityUpdateMessage(NetOutgoingMessage msg, ushort id, NetEntityType type, Vector3 position, Quaternion orientation, Vector3 velocity)
 {
     msg.Write((byte)NetMsgType.EntityUpdate);
     msg.Write((byte)type);
     msg.Write(id);
     msg.Write(position.X); msg.Write(position.Y); msg.Write(position.Z);
     msg.Write(velocity.X); msg.Write(velocity.Y); msg.Write(velocity.Z);
     msg.Write(orientation.X); msg.Write(orientation.Y);
     msg.Write(orientation.Z); msg.Write(orientation.W);
 }
예제 #2
0
 public EntityUpdateMessage(NetOutgoingMessage msg, ushort id, NetEntityType type, Vector3 position, Quaternion orientation, Vector3 velocity)
 {
     msg.Write((byte)NetMsgType.EntityUpdate);
     msg.Write((byte)type);
     msg.Write(id);
     msg.Write(position.X); msg.Write(position.Y); msg.Write(position.Z);
     msg.Write(velocity.X); msg.Write(velocity.Y); msg.Write(velocity.Z);
     msg.Write(orientation.X); msg.Write(orientation.Y);
     msg.Write(orientation.Z); msg.Write(orientation.W);
 }
예제 #3
0
 public static void EntityUpdateMessage(NetConnection c, ushort id, NetEntityType type, Vector3 position, Quaternion orientation, Vector3 velocity)
 {
     var msg = Network.Server.CreateMessage();
     msg.Write((byte)NetMsgType.EntityUpdate);
     msg.Write((byte)type);
     msg.Write(id);
     msg.Write(position.X); msg.Write(position.Y); msg.Write(position.Z);
     msg.Write(velocity.X); msg.Write(velocity.Y); msg.Write(velocity.Z);
     msg.Write(orientation.X); msg.Write(orientation.Y);
     msg.Write(orientation.Z); msg.Write(orientation.W);
     Network.Server.SendMessage(msg, c, NetDeliveryMethod.UnreliableSequenced, 1);
 }
예제 #4
0
        public static void EntityUpdateMessage(NetConnection c, ushort id, NetEntityType type, Vector3 position, Quaternion orientation, Vector3 velocity)
        {
            var msg = Network.Server.CreateMessage();

            msg.Write((byte)NetMsgType.EntityUpdate);
            msg.Write((byte)type);
            msg.Write(id);
            msg.Write(position.X); msg.Write(position.Y); msg.Write(position.Z);
            msg.Write(velocity.X); msg.Write(velocity.Y); msg.Write(velocity.Z);
            msg.Write(orientation.X); msg.Write(orientation.Y);
            msg.Write(orientation.Z); msg.Write(orientation.W);
            Network.Server.SendMessage(msg, c, NetDeliveryMethod.UnreliableSequenced, 1);
        }
예제 #5
0
파일: DisplayPara.cs 프로젝트: xiaoyj/Space
        public DisplayPara(NetEntityType disPlayType)
        {
            this.m_IconForeColor = Color.Transparent;
            this.m_IconTacColor = Color.Transparent;
            switch (disPlayType)
            {
                case NetEntityType.Transceiver:
                    this.IconNormalColor = Color.Yellow;
                    this.IconSelectedColor = Color.Blue;
                    this.IconSize = 20;
                    this.IconSymbol = PointSymbolStyle.Arrow;
                    this.Font = "Arial";
                    this.FontColor = Color.Black;
                    this.FontSize = 9;
                    this.FontSymbolStyle = "Regular";
                    break;

                case NetEntityType.Site:
                    this.IconNormalColor = Color.Black;
                    this.IconSelectedColor = Color.Blue;
                    this.IconSize = 6;
                    this.IconSymbol = PointSymbolStyle.Arrow;
                    this.Font = "Arial";
                    this.FontColor = Color.Black;
                    this.FontSize = 9;
                    this.FontSymbolStyle = "Regular";
                    break;

                case NetEntityType.Relay:
                    this.IconNormalColor = Color.Black;
                    this.IconSelectedColor = Color.Blue;
                    this.IconSize = 6;
                    this.IconSymbol = PointSymbolStyle.SolidTriangle;
                    this.Font = "Arial";
                    this.FontColor = Color.Black;
                    this.FontSize = 9;
                    this.FontSymbolStyle = "Regular";
                    break;

                case NetEntityType.Repeater:
                    this.IconNormalColor = Color.Red;
                    this.IconSelectedColor = Color.Blue;
                    this.IconSize = 0x18;
                    this.IconSymbol = PointSymbolStyle.Repeater;
                    this.Font = "Arial";
                    this.FontColor = Color.Black;
                    this.FontSize = 9;
                    this.FontSymbolStyle = "Regular";
                    break;
            }
        }
예제 #6
0
 public static void ClientEntityCreationMessage(NetConnection c, NetEntityType type, ushort id, Vector3 position, Quaternion orientation, ushort resource)
 {
     var msg = Network.Server.CreateMessage();
     msg.Write((byte)NetMsgType.CreateOnClient);
     msg.Write((byte)type);
     msg.Write(id);
     msg.Write(position.X); msg.Write(position.Y); msg.Write(position.Z);
     msg.Write(orientation.X); msg.Write(orientation.Y);
     msg.Write(orientation.Z); msg.Write(orientation.W);
     msg.Write(resource);
     if (c != null)
         Network.Server.SendMessage(msg, c, NetDeliveryMethod.ReliableOrdered);
     else
         Network.Server.SendToAll(msg, NetDeliveryMethod.ReliableOrdered);
 }
예제 #7
0
 public DispParamForm(DisplayPara disPlayPara, NetEntityType displayType)
 {
     this.InitializeComponent();
     this.m_SymbolBitmapExample = new Bitmap(this.pnlExample.Size.Width, this.pnlExample.Size.Height);
     this.m_FontBitmapExample = new Bitmap(this.FontPreView.Size.Width, this.FontPreView.Size.Height);
     this.m_DisPlayPara = disPlayPara;
     if (displayType == NetEntityType.Transceiver)
     {
         this.InitIconCellTablePage();
     }
     else
     {
         this.InitIconSiteTablePage();
     }
     this.InitFontTablePage();
 }
예제 #8
0
        public static void ClientEntityCreationMessage(NetConnection c, NetEntityType type, ushort id, Vector3 position, Quaternion orientation, ushort resource)
        {
            var msg = Network.Server.CreateMessage();

            msg.Write((byte)NetMsgType.CreateOnClient);
            msg.Write((byte)type);
            msg.Write(id);
            msg.Write(position.X); msg.Write(position.Y); msg.Write(position.Z);
            msg.Write(orientation.X); msg.Write(orientation.Y);
            msg.Write(orientation.Z); msg.Write(orientation.W);
            msg.Write(resource);
            if (c != null)
            {
                Network.Server.SendMessage(msg, c, NetDeliveryMethod.ReliableOrdered);
            }
            else
            {
                Network.Server.SendToAll(msg, NetDeliveryMethod.ReliableOrdered);
            }
        }