當前位置: 首頁>>代碼示例>>C#>>正文


C# BinaryReader.ReadString32方法代碼示例

本文整理匯總了C#中System.IO.BinaryReader.ReadString32方法的典型用法代碼示例。如果您正苦於以下問題:C# BinaryReader.ReadString32方法的具體用法?C# BinaryReader.ReadString32怎麽用?C# BinaryReader.ReadString32使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.IO.BinaryReader的用法示例。


在下文中一共展示了BinaryReader.ReadString32方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ScenarioFunctionBlock

 public ScenarioFunctionBlock(BinaryReader binaryReader)
 {
     this.flags = (Flags)binaryReader.ReadInt32();
     this.name = binaryReader.ReadString32();
     this.periodSecondsPeriodForAboveFunctionLowerValuesMakeFunctionOscillateQuicklyHigherValuesMakeItOscillateSlowly = binaryReader.ReadSingle();
     this.scalePeriodByMultiplyThisFunctionByAbovePeriod = binaryReader.ReadShortBlockIndex1();
     this.function = (Function)binaryReader.ReadInt16();
     this.scaleFunctionByMultiplyThisFunctionByResultOfAboveFunction = binaryReader.ReadShortBlockIndex1();
     this.wobbleFunctionCurveUsedForWobble = (WobbleFunctionCurveUsedForWobble)binaryReader.ReadInt16();
     this.wobblePeriodSecondsTimeItTakesForMagnitudeOfThisFunctionToCompleteAWobble = binaryReader.ReadSingle();
     this.wobbleMagnitudePercentAmountOfRandomWobbleInTheMagnitude = binaryReader.ReadSingle();
     this.squareWaveThresholdIfNonZeroAllValuesAboveSquareWaveThresholdAreSnappedTo10AndAllValuesBelowItAreSnappedTo00ToCreateASquareWave = binaryReader.ReadSingle();
     this.stepCountNumberOfDiscreteValuesToSnapToEGStepCountOf5SnapsFunctionTo000025050075Or100 = binaryReader.ReadInt16();
     this.mapTo = (MapTo)binaryReader.ReadInt16();
     this.sawtoothCountNumberOfTimesThisFunctionShouldRepeatEGSawtoothCountOf5GivesFunctionValueOf10AtEachOf025050And075AsWellAsAt10 = binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     this.scaleResultByMultiplyThisFunctionEGFromAWeaponVehicleFinalResultOfAllOfTheAboveMath = binaryReader.ReadShortBlockIndex1();
     this.boundsModeControlsHowBoundsBelowAreUsed = (BoundsModeControlsHowBoundsBelowAreUsed)binaryReader.ReadInt16();
     this.bounds = binaryReader.ReadSingle();
     this.padding0 = binaryReader.ReadBytes(4);
     this.padding1 = binaryReader.ReadBytes(2);
     this.turnOffWithIfSpecifiedFunctionIsOffSoIsThisFunction = binaryReader.ReadShortBlockIndex1();
     this.padding2 = binaryReader.ReadBytes(16);
     this.padding3 = binaryReader.ReadBytes(16);
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:25,代碼來源:Scenario.cs

示例2: TriggersBlock

 public TriggersBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.triggerFlags = (TriggerFlags)binaryReader.ReadInt32();
     this.combinationRule = (CombinationRule)binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(OrderCompletionCondition));
         this.conditions = new OrderCompletionCondition[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.conditions[i] = new OrderCompletionCondition(binaryReader);
             }
         }
     }
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:21,代碼來源:Scenario.cs

示例3: StructureBspSoundEnvironmentPaletteBlock

 public StructureBspSoundEnvironmentPaletteBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.soundEnvironment = binaryReader.ReadTagReference();
     this.cutoffDistance = binaryReader.ReadSingle();
     this.interpolationSpeed1Sec = binaryReader.ReadSingle();
     this.padding = binaryReader.ReadBytes(24);
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:8,代碼來源:Scenario.cs

示例4: ScenarioCutsceneFlagBlock

 public ScenarioCutsceneFlagBlock(BinaryReader binaryReader)
 {
     this.padding = binaryReader.ReadBytes(4);
     this.name = binaryReader.ReadString32();
     this.position = binaryReader.ReadVector3();
     this.facing = binaryReader.ReadVector2();
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:7,代碼來源:Scenario.cs

示例5: OrdersBlock

 public OrdersBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.style = binaryReader.ReadShortBlockIndex1();
     this.padding = binaryReader.ReadBytes(2);
     this.flags = (Flags)binaryReader.ReadInt32();
     this.forceCombatStatus = (ForceCombatStatus)binaryReader.ReadInt16();
     this.padding0 = binaryReader.ReadBytes(2);
     this.entryScript = binaryReader.ReadString32();
     this.skip1 = binaryReader.ReadBytes(2);
     this.followSquad = binaryReader.ReadShortBlockIndex1();
     this.followRadius = binaryReader.ReadSingle();
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(ZoneSetBlock));
         this.primaryAreaSet = new ZoneSetBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.primaryAreaSet[i] = new ZoneSetBlock(binaryReader);
             }
         }
     }
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(SecondaryZoneSetBlock));
         this.secondaryAreaSet = new SecondaryZoneSetBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.secondaryAreaSet[i] = new SecondaryZoneSetBlock(binaryReader);
             }
         }
     }
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(SecondarySetTriggerBlock));
         this.secondarySetTrigger = new SecondarySetTriggerBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.secondarySetTrigger[i] = new SecondarySetTriggerBlock(binaryReader);
             }
         }
     }
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(SpecialMovementBlock));
         this.specialMovement = new SpecialMovementBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.specialMovement[i] = new SpecialMovementBlock(binaryReader);
             }
         }
     }
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(OrderEndingBlock));
         this.orderEndings = new OrderEndingBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.orderEndings[i] = new OrderEndingBlock(binaryReader);
             }
         }
     }
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:83,代碼來源:Scenario.cs

示例6: HsGlobalsBlock

 public HsGlobalsBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.type = (Type)binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     this.initializationExpressionIndex = binaryReader.ReadInt32();
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:7,代碼來源:Scenario.cs

示例7: CsPointBlock

 public CsPointBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.position = binaryReader.ReadVector3();
     this.referenceFrame = binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     this.surfaceIndex = binaryReader.ReadInt32();
     this.facingDirection = binaryReader.ReadVector2();
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:9,代碼來源:Scenario.cs

示例8: SquadGroupsBlock

 public SquadGroupsBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.parent = binaryReader.ReadShortBlockIndex1();
     this.initialOrders = binaryReader.ReadShortBlockIndex1();
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:6,代碼來源:Scenario.cs

示例9: ActorStartingLocationsBlock

 public ActorStartingLocationsBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.position = binaryReader.ReadVector3();
     this.referenceFrame = binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     this.facingYawPitchDegrees = binaryReader.ReadVector2();
     this.flags = (Flags)binaryReader.ReadInt32();
     this.characterType = binaryReader.ReadShortBlockIndex1();
     this.initialWeapon = binaryReader.ReadShortBlockIndex1();
     this.initialSecondaryWeapon = binaryReader.ReadShortBlockIndex1();
     this.padding0 = binaryReader.ReadBytes(2);
     this.vehicleType = binaryReader.ReadShortBlockIndex1();
     this.seatType = (SeatType)binaryReader.ReadInt16();
     this.grenadeType = (GrenadeType)binaryReader.ReadInt16();
     this.swarmCountNumberOfCreturesInSwarmIfASwarmIsSpawnedAtThisLocation = binaryReader.ReadInt16();
     this.actorVariantName = binaryReader.ReadStringID();
     this.vehicleVariantName = binaryReader.ReadStringID();
     this.initialMovementDistanceBeforeDoingAnythingElseTheActorWillTravelTheGivenDistanceInItsForwardDirection = binaryReader.ReadSingle();
     this.emitterVehicle = binaryReader.ReadShortBlockIndex1();
     this.initialMovementMode = (InitialMovementMode)binaryReader.ReadInt16();
     this.placementScript = binaryReader.ReadString32();
     this.skip1 = binaryReader.ReadBytes(2);
     this.padding2 = binaryReader.ReadBytes(2);
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:25,代碼來源:Scenario.cs

示例10: ScenarioProfilesBlock

 public ScenarioProfilesBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.startingHealthDamage01 = binaryReader.ReadSingle();
     this.startingShieldDamage01 = binaryReader.ReadSingle();
     this.primaryWeapon = binaryReader.ReadTagReference();
     this.roundsLoaded = binaryReader.ReadInt16();
     this.roundsTotal = binaryReader.ReadInt16();
     this.secondaryWeapon = binaryReader.ReadTagReference();
     this.roundsLoaded0 = binaryReader.ReadInt16();
     this.roundsTotal0 = binaryReader.ReadInt16();
     this.startingFragmentationGrenadeCount = binaryReader.ReadByte();
     this.startingPlasmaGrenadeCount = binaryReader.ReadByte();
     this.startingUnknownGrenadeCount = binaryReader.ReadByte();
     this.startingUnknownGrenadeCount0 = binaryReader.ReadByte();
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:16,代碼來源:Scenario.cs

示例11: RecordedAnimationBlock

 public RecordedAnimationBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.version = binaryReader.ReadByte();
     this.rawAnimationData = binaryReader.ReadByte();
     this.unitControlDataVersion = binaryReader.ReadByte();
     this.padding = binaryReader.ReadByte();
     this.lengthOfAnimationTicks = binaryReader.ReadInt16();
     this.padding0 = binaryReader.ReadBytes(2);
     this.padding1 = binaryReader.ReadBytes(4);
     this.paddingrecordedAnimationEventStream = binaryReader.ReadBytes(8);
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:12,代碼來源:Scenario.cs

示例12: DeviceGroupBlock

 public DeviceGroupBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.initialValue01 = binaryReader.ReadSingle();
     this.flags = (Flags)binaryReader.ReadInt32();
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:6,代碼來源:Scenario.cs

示例13: ScenarioObjectNamesBlock

 public ScenarioObjectNamesBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.eMPTYSTRING = binaryReader.ReadShortBlockIndex1();
     this.eMPTYSTRING0 = binaryReader.ReadShortBlockIndex2();
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:6,代碼來源:Scenario.cs

示例14: EditorCommentBlock

 public EditorCommentBlock(BinaryReader binaryReader)
 {
     this.position = binaryReader.ReadVector3();
     this.type = (Type)binaryReader.ReadInt32();
     this.name = binaryReader.ReadString32();
     this.comment = binaryReader.ReadString256();
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:7,代碼來源:Scenario.cs

示例15: AiConversationBlock

 public AiConversationBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.flags = (Flags)binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     this.triggerDistanceWorldUnitsDistanceThePlayerMustEnterBeforeTheConversationCanTrigger = binaryReader.ReadSingle();
     this.runToPlayerDistWorldUnitsIfTheInvolvesPlayerFlagIsSetWhenTriggeredTheConversationsParticipantSWillRunToWithinThisDistanceOfThePlayer = binaryReader.ReadSingle();
     this.padding0 = binaryReader.ReadBytes(36);
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(AiConversationParticipantBlock));
         this.participants = new AiConversationParticipantBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.participants[i] = new AiConversationParticipantBlock(binaryReader);
             }
         }
     }
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(AiConversationLineBlock));
         this.lines = new AiConversationLineBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.lines[i] = new AiConversationLineBlock(binaryReader);
             }
         }
     }
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(GNullBlock));
         this.gNullBlock = new GNullBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.gNullBlock[i] = new GNullBlock(binaryReader);
             }
         }
     }
 }
開發者ID:jacksoncougar,項目名稱:Moonfish-Editor,代碼行數:51,代碼來源:Scenario.cs


注:本文中的System.IO.BinaryReader.ReadString32方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。