// Read this object from message-in internal override bool Read(BinaryReader binaryReader, EndPoint senderEndPoint, int gameVersion) { if (base.Read(binaryReader, senderEndPoint, gameVersion) == false) return NetworkError(); // Ship Type MyMwcObjectBuilder_LargeShip_TypesEnum? shipType = MyMwcMessageIn.ReadObjectBuilderLargeShipTypesEnumEx(binaryReader, senderEndPoint); if (shipType == null) return NetworkError(); ShipType = shipType.Value; MyMwcLog.IfNetVerbose_AddToLog("ShipType: " + ShipType); return true; }
public static MyGuiLargeShipHelper GetMyGuiLargeShipHelper(MyMwcObjectBuilder_LargeShip_TypesEnum largeShipEnum) { MyGuiLargeShipHelper ret; if (m_largeShipHelpers.TryGetValue(largeShipEnum, out ret)) { return(ret); } else { return(null); } }
// Read this object from message-in internal override bool Read(BinaryReader binaryReader, EndPoint senderEndPoint, int gameVersion) { if (base.Read(binaryReader, senderEndPoint, gameVersion) == false) { return(NetworkError()); } // Ship Type MyMwcObjectBuilder_LargeShip_TypesEnum?shipType = MyMwcMessageIn.ReadObjectBuilderLargeShipTypesEnumEx(binaryReader, senderEndPoint); if (shipType == null) { return(NetworkError()); } ShipType = shipType.Value; MyMwcLog.IfNetVerbose_AddToLog("ShipType: " + ShipType); return(true); }
internal override void SetObjectBuilderIdInternal(int?objectBuilderId) { ShipType = (MyMwcObjectBuilder_LargeShip_TypesEnum)Convert.ToUInt16(objectBuilderId); }
public MyMwcObjectBuilder_LargeShip(MyMwcObjectBuilder_LargeShip_TypesEnum shipType) { ShipType = shipType; }
private void AddLargeShip(MyMwcObjectBuilder_LargeShip_TypesEnum? tag, Vector2? screenPosition = null) { if (!tag.HasValue) { return; } MyMwcObjectBuilder_LargeShip largeShipBuilder = new MyMwcObjectBuilder_LargeShip(tag.Value); MyEditor.Static.CreateFromObjectBuilder(largeShipBuilder, Matrix.Identity, screenPosition); }
internal override void SetObjectBuilderIdInternal(int? objectBuilderId) { ShipType = (MyMwcObjectBuilder_LargeShip_TypesEnum) Convert.ToUInt16(objectBuilderId); }
public static void WriteObjectBuilderLargeShipTypesEnum(MyMwcObjectBuilder_LargeShip_TypesEnum val, BinaryWriter binaryWriter) { binaryWriter.Write((ushort)val); }