コード例 #1
0
ファイル: ControlPoint.cs プロジェクト: MrZSFG/GardenConquest
 public void serialize(VRage.ByteStream stream)
 {
     stream.addLong((long)Position.X);
     stream.addLong((long)Position.Y);
     stream.addLong((long)Position.Z);
     stream.addString(Name);
     stream.addLong(Radius);
     stream.addLong(TokensPerPeriod);
 }
コード例 #2
0
 public void AddToByteStream(VRage.ByteStream stream)
 {
     stream.addLong(EntityId);
     stream.addUShort((ushort)Type);
     stream.addVector3D(Position);
     stream.addBoolean(Transparent);
     stream.addBoolean(IsStatic);
     stream.addUShort((ushort)Revealability);
     stream.addUShort((ushort)Concealability);
     stream.addUShort((ushort)Status);
 }
コード例 #3
0
ファイル: GridEnforcer.cs プロジェクト: Devlah/GardenConquest
        public void serialize(VRage.ByteStream stream)
        {
            stream.addBoolean(SupportedByFleet);
            stream.addLong(Grid.EntityId);
            stream.addUShort((ushort)m_EffectiveClass);
            stream.addString(Grid.DisplayName);
            stream.addUShort((ushort)BlockCount);

            // Serialize position data if the owner of the grid
            if (Grid.canInteractWith(Owner.PlayerID)) {
                stream.addBoolean(true);
                stream.addLong((long)Grid.GetPosition().X);
                stream.addLong((long)Grid.GetPosition().Y);
                stream.addLong((long)Grid.GetPosition().Z);
            }
            else {
                stream.addBoolean(false);
            }
        }
コード例 #4
0
ファイル: HullRuleSet.cs プロジェクト: MrZSFG/GardenConquest
        public void serialize(VRage.ByteStream stream)
        {
            stream.addString(DisplayName);
            stream.addUShort((ushort)MaxPerFaction);
            stream.addUShort((ushort)MaxPerSoloPlayer);
            stream.addUShort((ushort)CaptureMultiplier);
            stream.addLong(MaxBlocks);
            stream.addBoolean(ShouldBeStation);

            stream.addUShort((ushort)BlockTypeLimits.Length);
            foreach (int limit in BlockTypeLimits) {
                stream.addUShort((ushort)limit);
            }
        }
コード例 #5
0
 // Byte Serialization
 public virtual void AddToByteStream(VRage.ByteStream stream)
 {
     UpdateRevealabilityManual();
     stream.addUShort((ushort)TypeOfEntity);
     stream.addLong(EntityId);
     stream.addVector3D(Position);
     // Clients don't need AABB details
     stream.addBoolean(IsRevealBlocked);
     stream.addBoolean(IsObserved);
 }
コード例 #6
0
ファイル: EntityComponent.cs プロジェクト: zrisher/SEGarden
 public virtual void AddToByteStream(VRage.ByteStream stream)
 {
     stream.addLong(EntityId);
 }