当前位置: 首页>>代码示例>>C#>>正文


C# MpqFileStream.ReadValueF32方法代码示例

本文整理汇总了C#中CrystalMpq.MpqFileStream.ReadValueF32方法的典型用法代码示例。如果您正苦于以下问题:C# MpqFileStream.ReadValueF32方法的具体用法?C# MpqFileStream.ReadValueF32怎么用?C# MpqFileStream.ReadValueF32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CrystalMpq.MpqFileStream的用法示例。


在下文中一共展示了MpqFileStream.ReadValueF32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Read

 public void Read(MpqFileStream stream)
 {
     this.I0 = stream.ReadValueS32();
     this.SNOSubTreasureClass = stream.ReadValueS32();
     this.Percentage = stream.ReadValueF32();
     this.I1 = stream.ReadValueS32();
     this.GBIdQualityClass = stream.ReadValueS32();
     this.I2 = stream.ReadValueS32();
     this.I3 = stream.ReadValueS32();
     this.SNOCondition = stream.ReadValueS32();
     this.ItemSpecifier = new ItemSpecifierData(stream);
     this.I5 = stream.ReadValueS32();
     this.I4 = new int[4];
     for (int i = 0; i < 4; i++)
         this.I4[i] = stream.ReadValueS32();
 }
开发者ID:Velhenn,项目名称:mooege,代码行数:16,代码来源:TreasureClass.cs

示例2: TagMapEntry

        public TagMapEntry(MpqFileStream stream)
        {
            this.Type = stream.ReadValueS32();
            this.TagID = stream.ReadValueS32();

            switch (this.Type)
            {
                case 0:
                    this.Int2 = stream.ReadValueS32();
                    break;
                case 1:
                    Float0 = stream.ReadValueF32();
                    break;
                case 2: // SNO
                    this.Int2 = stream.ReadValueS32();
                    break;
                case 4:
                    this.ScriptFormula = new ScriptFormula(stream);
                    break;
                default:
                    this.Int2 = stream.ReadValueS32();
                    break;
            }
        }
开发者ID:ripper47,项目名称:mooege,代码行数:24,代码来源:Common.cs

示例3: MonsterDef

 public MonsterDef(MpqFileStream stream)
 {
     F0 = stream.ReadValueF32();
     F1 = stream.ReadValueF32();
     F2 = stream.ReadValueF32();
     F3 = stream.ReadValueF32();
     I0 = stream.ReadValueS32();
 }
开发者ID:ralje,项目名称:mooege,代码行数:8,代码来源:Monster.cs

示例4: NavMeshDef

            public NavMeshDef(MpqFileStream stream)
            {
                this.SquaresCountX = stream.ReadValueS32();
                this.SquaresCountY = stream.ReadValueS32();
                this.Int0 = stream.ReadValueS32();
                this.NavMeshSquareCount = stream.ReadValueS32();
                this.Float0 = stream.ReadValueF32();
                this.Squares = stream.ReadSerializedData<NavMeshSquare>(this.NavMeshSquareCount);

                stream.Position += (3 * 4);
                this.Filename = stream.ReadString(256, true);
            }
开发者ID:keltins,项目名称:mooege,代码行数:12,代码来源:Scene.cs

示例5: FileRead

 public void FileRead(MpqFileStream stream, long offset)
 {
     stream.Position = offset + 0;
     Field0 = new RequiredMessageHeader();
     Field0.FileRead(stream, stream.Position);
     stream.Position = offset + 8;
     Tick = stream.ReadValueS32();
     stream.Position = offset + 12;
     _Field2 = stream.ReadValueS32();
     stream.Position = offset + 16;
     Position = new Vector3D();
     Position.FileRead(stream, stream.Position);
     stream.Position = offset + 28;
     Angle = stream.ReadValueF32();
     stream.Position = offset + 32;
     Speed = stream.ReadValueF32();
     stream.Position = offset + 36;
     Field6 = stream.ReadValueS32();
     stream.Position = offset + 40;
     _AnimationTag = stream.ReadValueS32();
     stream.Position = offset + 44;
     // : type DT_OPTIONAL[int] hasnt a deserializer implemented
     throw new Exception("some fields arent going to be decoded.");
 }
开发者ID:starcasters,项目名称:type-extractor,代码行数:24,代码来源:classgenerator-output.cs

示例6: NavMeshDef

            public NavMeshDef(MpqFileStream stream)
            {
                this.SquaresCountX = stream.ReadValueS32();
                this.SquaresCountY = stream.ReadValueS32();
                this.Int0 = stream.ReadValueS32();
                this.NavMeshSquareCount = stream.ReadValueS32();
                this.Float0 = stream.ReadValueF32();
                this.Squares = stream.ReadSerializedData<NavMeshSquare>();
               
                if (SquaresCountX < 64 && SquaresCountY < 64)
                {
                    WalkGrid = new byte[64, 64];
                }
                else if (SquaresCountX < 128 && SquaresCountY < 128)
                {
                    WalkGrid = new byte[128, 128]; //96*96
                }
                else if (SquaresCountX > 128 || SquaresCountY > 128)
                {
                    WalkGrid = new byte[256, 256];
                }


                // Loop thru each NavmeshSquare in the array, and fills the grid
                for (int i = 0; i < NavMeshSquareCount; i++)
                {
                    WalkGrid[i % SquaresCountX, i / SquaresCountY] = (byte)(Squares[i].Flags & Scene.NavCellFlags.AllowWalk);
                   // Set the grid to 0x1 if its walkable, left as 0 if not. - DarkLotus
                }

                stream.Position += (3 * 4);
                this.Filename = stream.ReadString(256, true);
            }
开发者ID:tovipoussin,项目名称:mooege,代码行数:33,代码来源:Scene.cs

示例7: Read

 public void Read(MpqFileStream stream)
 {
     this.Float0 = stream.ReadValueF32();
     this.Flags = stream.ReadValueS32();
 }
开发者ID:keltins,项目名称:mooege,代码行数:5,代码来源:Scene.cs

示例8: Read

 public void Read(MpqFileStream stream)
 {
     X = stream.ReadValueF32();
     Y = stream.ReadValueF32();
     Z = stream.ReadValueF32();
 }
开发者ID:God601,项目名称:mooege,代码行数:6,代码来源:Vector3D.cs

示例9: NavZoneDef

            public NavZoneDef(MpqFileStream stream)
            {
                this.NavCellCount = stream.ReadValueS32();
                stream.Position += (3 * 4);
                this.NavCells = stream.ReadSerializedData<NavCell>();

                this.NeighbourCount = stream.ReadValueS32();
                stream.Position += (3 * 4);
                this.NavCellNeighbours = stream.ReadSerializedData<NavCellLookup>();

                this.Float0 = stream.ReadValueF32();
                this.Float1 = stream.ReadValueF32();
                this.Int2 = stream.ReadValueS32();
                this.V0 = new Vector2D(stream);

                stream.Position += (3 * 4);
                this.GridSquares = stream.ReadSerializedData<NavGridSquare>();

                this.Int3 = stream.ReadValueS32();
                stream.Position += (3 * 4);
                this.CellLookups = stream.ReadSerializedData<NavCellLookup>();

                this.BorderDataCount = stream.ReadValueS32();
                stream.Position += (3 * 4);
                this.BorderData = stream.ReadSerializedData<NavCellBorderData>();
            }
开发者ID:tovipoussin,项目名称:mooege,代码行数:26,代码来源:Scene.cs

示例10: MonsterSkillDeclaration

 public MonsterSkillDeclaration(MpqFileStream stream)
 {
     F0 = stream.ReadValueF32();
     F1 = stream.ReadValueF32();
     I0 = stream.ReadValueS32();
     F2 = stream.ReadValueF32();
 }
开发者ID:ralje,项目名称:mooege,代码行数:7,代码来源:Monster.cs

示例11: HealthDropInfo

 public HealthDropInfo(MpqFileStream stream)
 {
     this.F0 = stream.ReadValueF32();
     this.GBID = stream.ReadValueS32();
     this.I1 = stream.ReadValueS32();
 }
开发者ID:ralje,项目名称:mooege,代码行数:6,代码来源:Monster.cs

示例12: Vector3D

 /// <summary>
 /// Reads Vector3D from given MPQFileStream.
 /// </summary>
 /// <param name="stream">The MPQFileStream to read from.</param>
 public Vector3D(MpqFileStream stream)
     : this(stream.ReadValueF32(), stream.ReadValueF32(), stream.ReadValueF32())
 {
 }
开发者ID:ncoop23,项目名称:mooege,代码行数:8,代码来源:Vector3D.cs

示例13: DifficultyTuningParams

 public DifficultyTuningParams(MpqFileStream stream)
 {
     this.F0 = stream.ReadValueF32();
     this.F1 = stream.ReadValueF32();
     this.F2 = stream.ReadValueF32();
     this.F3 = stream.ReadValueF32();
     this.F4 = stream.ReadValueF32();
     this.F5 = stream.ReadValueF32();
     this.F6 = stream.ReadValueF32();
 }
开发者ID:ncoop23,项目名称:mooege,代码行数:10,代码来源:Globals.cs

示例14: Read

 public void Read(MpqFileStream stream)
 {
     this.Z = stream.ReadValueF32();
     this.Flags = (NavCellFlags)stream.ReadValueS32();
 }
开发者ID:tovipoussin,项目名称:mooege,代码行数:5,代码来源:Scene.cs

示例15: Read

 public void Read(MpqFileStream stream)
 {
     this.UHash = stream.ReadValueS32();
     this.S0 = stream.ReadString(64, true);
     this.F0 = stream.ReadValueF32();
 }
开发者ID:ncoop23,项目名称:mooege,代码行数:6,代码来源:Globals.cs


注:本文中的CrystalMpq.MpqFileStream.ReadValueF32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。