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


C# FileReader.ReadByte方法代码示例

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


在下文中一共展示了FileReader.ReadByte方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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


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