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


C# FileReader.ReadUInt32方法代码示例

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


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

示例1: Bone

        public Bone(FileReader Reader, int Index)
        {
            BoneIndex = Index;

            Reader.ReadUInt32(); //Unknown
            Name = Reader.ReadPascalString();
            ParentName = Reader.ReadPascalString();
            HasPropertyList = (Reader.ReadByte() != 0) ? true : false;

            if(HasPropertyList)
            {
                uint PropertyCount = Reader.ReadUInt32();
                for (int i = 0; i < PropertyCount; i++)
                    PropertyList.Add(new Property(Reader));
            }

            Translation = new Vector3(Reader.ReadFloat(), Reader.ReadFloat(), Reader.ReadFloat());
            Rotation = new Quaternion(Reader.ReadFloat(), -Reader.ReadFloat(), -Reader.ReadFloat(), Reader.ReadFloat());

            CanTranslate = (Reader.ReadUInt32() != 0) ? true : false;
            CanRotate = (Reader.ReadUInt32() != 0) ? true : false;
            CanBlend = (Reader.ReadUInt32() != 0) ? true : false;

            //Don Hopkins says the Wiggle parameters are left over from an attempt to use Perlin noise
            //introduce some randomness into the animations, so that an animation would look a little different
            //each time it was run.
            Reader.ReadFloat();
            Reader.ReadFloat();
        }
开发者ID:Afr0Games,项目名称:Project-Dollhouse,代码行数:29,代码来源:Bone.cs

示例2: BoneBinding

 public BoneBinding(FileReader Reader)
 {
     BoneIndex = Reader.ReadUInt32();
     FirstRealVertexIndex = Reader.ReadUInt32();
     RealVertexCount = Reader.ReadUInt32();
     FirstBlendVertexIndex = Reader.ReadUInt32();
     BlendVertexCount = Reader.ReadUInt32();
 }
开发者ID:Afr0Games,项目名称:Project-Dollhouse,代码行数:8,代码来源:BoneBinding.cs

示例3: TimeProperty

        /// <summary>
        /// Constructs a new TimeProperty instance.
        /// </summary>
        /// <param name="Reader">A FileReader instance used to read a TimeProperty.</param>
        public TimeProperty(FileReader Reader)
        {
            ID = Reader.ReadUInt32();
            uint PropsCount = Reader.ReadUInt32();

            for (int i = 0; i < PropsCount; i++)
                PropertyList.Add(new Property(Reader));
        }
开发者ID:Afr0Games,项目名称:Project-Dollhouse,代码行数:12,代码来源:TimeProperty.cs

示例4: Property

        /// <summary>
        /// Constructs a new Property instance.
        /// </summary>
        /// <param name="Reader">A FileReader instance, used to read the Property.</param>
        public Property(FileReader Reader)
        {
            uint PairCount = Reader.ReadUInt32();

            for (int i = 0; i < PairCount; i++)
                PropertyPairs.Add(Reader.ReadPascalString(), Reader.ReadPascalString());
        }
开发者ID:Afr0Games,项目名称:Project-Dollhouse,代码行数:11,代码来源:Property.cs

示例5: Motion

        public Motion(FileReader Reader)
        {
            Reader.ReadUInt32(); //Unknown
            BoneName = Reader.ReadPascalString();
            FrameCount = Reader.ReadUInt32();
            Duration = Reader.ReadFloat();
            HasTranslation = (Reader.ReadByte() != 0) ? true : false;
            HasRotation = (Reader.ReadByte() != 0) ? true : false;
            FirstTranslationIndex = Reader.ReadUInt32();
            FirstRotationIndex = Reader.ReadUInt32();
            HasPropsList = (Reader.ReadByte() != 0) ? true : false;

            if(HasPropsList)
            {
                uint PropsListCount = Reader.ReadUInt32();

                for(int i = 0; i < PropsListCount; i++)
                {
                    uint PropsCount = Reader.ReadUInt32();
                    PropertyLists.Add(new List<Property>());

                    for (int j = 0; j < PropsCount; j++)
                        PropertyLists[i].Add(new Property(Reader));
                }
            }

            HasTimepropertyLists = (Reader.ReadByte() != 0) ? true : false;

            if(HasTimepropertyLists)
            {
                uint TimePropsListCount = Reader.ReadUInt32();

                for (int i = 0; i < TimePropsListCount; i++)
                {
                    uint PropsCount = Reader.ReadUInt32();
                    TimePropertyLists.Add(new List<TimeProperty>());

                    for (int j = 0; j < PropsCount; j++)
                        TimePropertyLists[i].Add(new TimeProperty(Reader));
                }
            }
        }
开发者ID:Afr0Games,项目名称:Project-Dollhouse,代码行数:42,代码来源:Motion.cs

示例6: BlendVertexProperty

 public BlendVertexProperty(FileReader Reader)
 {
     Weight = Reader.ReadUInt32();
     OtherVertexIndex = Reader.ReadUInt32();
 }
开发者ID:Afr0Games,项目名称:Project-Dollhouse,代码行数:5,代码来源:BlendVertexProperty.cs

示例7: Gesture

 /// <summary>
 /// Constructs a new instance of the Gesture class.
 /// </summary>
 /// <param name="Reader">A FileReader used to read a HandGroup file.</param>
 public Gesture(FileReader Reader)
 {
     uint FileID = Reader.ReadUInt32();
     uint TypeID = Reader.ReadUInt32();
     AppearanceID = new UniqueFileID(TypeID, FileID);
 }
开发者ID:Afr0Games,项目名称:Project-Dollhouse,代码行数:10,代码来源:Gesture.cs

示例8: ReadHeader

        private void ReadHeader(FileReader Reader)
        {
            Type = (IFFChunkTypes)Enum.Parse(typeof(IFFChunkTypes), Reader.ReadString(4).Replace("#", "").Replace("\0", ""));
            Size = Reader.ReadUInt32();
            ID = Reader.ReadUShort();
            Reader.ReadUShort();  //Flags
            Reader.ReadBytes(64); //Label

            m_Data = Reader.ReadBytes((int)(Size - 76));

            if (!Endian.IsBigEndian)
                Array.Reverse(m_Data); //Data is Little Endian, so needs to be reversed.
        }
开发者ID:Afr0Games,项目名称:Project-Dollhouse,代码行数:13,代码来源:IFFChunk.cs


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