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


C# Assets.AssetLoader类代码示例

本文整理汇总了C#中Glare.Assets.AssetLoader的典型用法代码示例。如果您正苦于以下问题:C# AssetLoader类的具体用法?C# AssetLoader怎么用?C# AssetLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: WeaponReinforcement

            internal WeaponReinforcement(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                PhysicsAtkRate = reader.ReadSingle();
                MagicAtkRate = reader.ReadSingle();
                FireAtkRate = reader.ReadSingle();
                ThunderAtkRate = reader.ReadSingle();
                StaminaAtkRate = reader.ReadSingle();
                SaWeaponAtkRate = reader.ReadSingle();
                SaDurabilityRate = reader.ReadSingle();
                CorrectStrengthRate = reader.ReadSingle();
                CorrectAgilityRate = reader.ReadSingle();
                CorrectMagicRate = reader.ReadSingle();
                CorrectFaithRate = reader.ReadSingle();
                PhysicsGuardCutRate = reader.ReadSingle();
                MagicGuardCutRate = reader.ReadSingle();
                FireGuardCutRate = reader.ReadSingle();
                ThunderGuardCutRate = reader.ReadSingle();
                PoisonGuardResistRate = reader.ReadSingle();
                DiseaseGuardResistRate = reader.ReadSingle();
                BloodGuardResistRate = reader.ReadSingle();
                CurseGuardResistRate = reader.ReadSingle();
                StaminaGuardDefRate = reader.ReadSingle();
                SpEffectId1 = reader.ReadByte();
                SpEffectId2 = reader.ReadByte();
                SpEffectId3 = reader.ReadByte();
                ResidentSpEffectId1 = reader.ReadByte();
                ResidentSpEffectId2 = reader.ReadByte();
                ResidentSpEffectId3 = reader.ReadByte();
                MaterialSetId = reader.ReadByte();
                Pad = reader.ReadBytes(9);
            }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:34,代码来源:WeaponReinforcement.cs

示例2: EnemyStandardInfo

            internal EnemyStandardInfo(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                EnemyBehaviorID = (EnemyBehaviorId)reader.ReadInt32();
                HP = reader.ReadUInt16();
                AttackPower = reader.ReadUInt16();
                ChrType = (CharacterTyep)reader.ReadInt32();
                HitHeight = reader.ReadSingle();
                HitRadius = reader.ReadSingle();
                Weight = reader.ReadSingle();
                DynamicFriction = reader.ReadSingle();
                StaticFriction = reader.ReadSingle();
                UpperDefState = reader.ReadInt32();
                ActionDefState = reader.ReadInt32();
                RotY_per_Second = reader.ReadSingle();
                Reserve0 = reader.ReadBytes(20);
                RotY_per_Second_old = reader.ReadByte();
                EnableSideStep = reader.ReadByte();
                UseRagdollHit = reader.ReadByte();
                Reserve_last = reader.ReadBytes(5);
                Stamina = reader.ReadUInt16();
                StaminaRecover = reader.ReadUInt16();
                StaminaConsumption = reader.ReadUInt16();
                Deffenct_Phys = reader.ReadUInt16();
                Reserve_last2 = reader.ReadBytes(48);
            }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:28,代码来源:EnemyStandardInfo.cs

示例3: Skeleton

            internal Skeleton(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                NeckTurnGain = reader.ReadSingle();
                OriginalGroundHeightMS = reader.ReadInt16();
                MinAnkleHeightMS = reader.ReadInt16();
                MaxAnkleHeightMS = reader.ReadInt16();
                CosineMaxKneeAngle = reader.ReadInt16();
                CosineMinKneeAngle = reader.ReadInt16();
                FootPlantedAnkleHeightMS = reader.ReadInt16();
                FootRaisedAnkleHeightMS = reader.ReadInt16();
                RaycastDistanceUp = reader.ReadInt16();
                RaycastDistanceDown = reader.ReadInt16();
                FootEndLS_X = reader.ReadInt16();
                FootEndLS_Y = reader.ReadInt16();
                FootEndLS_Z = reader.ReadInt16();
                OnOffGain = reader.ReadInt16();
                GroundAscendingGain = reader.ReadInt16();
                GroundDescendingGain = reader.ReadInt16();
                FootRaisedGain = reader.ReadInt16();
                FootPlantedGain = reader.ReadInt16();
                FootUnlockGain = reader.ReadInt16();
                KneeAxisType = (SkeletonKneeAxisDirection)reader.ReadByte();
                UseFootLocking = reader.ReadByte() != 0;
                FootPlacementOn = reader.ReadByte() != 0;
                TwistKneeAxisType = (SkeletonKneeAxisDirection)reader.ReadByte();
                NeckTurnPriority = reader.ReadSByte();
                NeckTurnMaxAngle = reader.ReadByte();
                Pad1 = reader.ReadBytes(2);
            }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:32,代码来源:Skeleton.cs

示例4: CalculationCorrection

            internal CalculationCorrection(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                StageMaxVal0 = reader.ReadSingle();
                StageMaxVal1 = reader.ReadSingle();
                StageMaxVal2 = reader.ReadSingle();
                StageMaxVal3 = reader.ReadSingle();
                StageMaxVal4 = reader.ReadSingle();
                StageMaxGrowVal0 = reader.ReadSingle();
                StageMaxGrowVal1 = reader.ReadSingle();
                StageMaxGrowVal2 = reader.ReadSingle();
                StageMaxGrowVal3 = reader.ReadSingle();
                StageMaxGrowVal4 = reader.ReadSingle();
                AdjPt_maxGrowVal0 = reader.ReadSingle();
                AdjPt_maxGrowVal1 = reader.ReadSingle();
                AdjPt_maxGrowVal2 = reader.ReadSingle();
                AdjPt_maxGrowVal3 = reader.ReadSingle();
                AdjPt_maxGrowVal4 = reader.ReadSingle();
                Init_inclination_soul = reader.ReadSingle();
                Adjustment_value = reader.ReadSingle();
                Boundry_inclination_soul = reader.ReadSingle();
                Boundry_value = reader.ReadSingle();
                Pad = reader.ReadBytes(4);
            }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:26,代码来源:CalculationCorrection.cs

示例5: PictureCel

        internal PictureCel(Picture picture, int celIndex, AssetLoader loader)
            : base(loader)
        {
            Name = "Cel " + celIndex;
            BinaryReader reader = loader.Reader;

            reader.BaseStream.Position = 0x0E + celIndex * 0x2A;
            Vector2i dimensions = new Vector2i(reader.ReadUInt16(), reader.ReadUInt16());
            Displacement = new Vector2i(reader.ReadUInt16(), reader.ReadUInt16());
            MaskIndex = reader.ReadByte();
            loader.ExpectZeroes(1, 3);
            Unknowns.ReadInt32s(reader, 2, "Data offsets?");
            loader.ExpectZeroes(4, 1);
            int dataOffset = reader.ReadInt32();
            loader.ExpectZeroes(4, 2);
            Priority = reader.ReadUInt16();
            Offset = new Vector2i(reader.ReadUInt16(), reader.ReadUInt16()) * 2;
            if (Offset.Y > 0)
                Offset = new Vector2i(Offset.X, Offset.Y * 6 / 5);

            reader.BaseStream.Position = dataOffset;
            int[] indices = reader.ReadBytesAsInt32(dimensions.Product);

            Setup(picture.Palette.PaletteAsset, dimensions.X, dimensions.Y, indices);
        }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:25,代码来源:PictureCel.cs

示例6: Archive

        internal Archive(AssetLoader loader)
            : base(loader)
        {
            BinaryReader reader = Reader = loader.Reader;

            loader.Position = loader.Length - 12;
            reader.Require(Magic);

            int namesSize = reader.ReadInt32(); // Number of bytes of the headerSize that are record names, sometimes (always?) plus a few bytes.
            int headersSize = reader.ReadInt32();
            reader.BaseStream.Position = loader.Length - headersSize;

            int count = reader.ReadInt32();
            for (int index = 0; index < count; index++) {
                int nameLength = reader.ReadInt32();
                string name = reader.ReadString(nameLength - 1, Encoding.ASCII);
                reader.Require((byte)0);
                int id = reader.ReadInt32();
                ArchiveRecordMode mode = (ArchiveRecordMode)reader.ReadInt32();
                int size = reader.ReadInt32();
                int sizeCompressed = reader.ReadInt32();
                uint offset = reader.ReadUInt32();

                if (mode != ArchiveRecordMode.Directory)
                    new ArchiveRecord(this, name, id, mode, size, sizeCompressed, offset);
            }
        }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:27,代码来源:Archive.cs

示例7: Accessory

            internal Accessory(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                RefId = reader.ReadInt32();
                SfxVariationId = reader.ReadInt32();
                Weight = reader.ReadSingle();
                BehaviorId = reader.ReadInt32();
                BasicPrice = reader.ReadInt32();
                SellValue = reader.ReadInt32();
                SortId = reader.ReadInt32();
                QwcId = reader.ReadInt32();
                EquipModelId = reader.ReadUInt16();
                IconId = reader.ReadUInt16();
                ShopLv = reader.ReadInt16();
                TrophySGradeId = reader.ReadInt16();
                TrophySeqId = reader.ReadInt16();
                EquipModelCategory = (EquipModelCategory)reader.ReadByte();
                EquipModelGender = (EquipModelGender)reader.ReadByte();
                AccessoryCategory = (AccessoryCategory)reader.ReadByte();
                RefCategory = (BehaviorRefType)reader.ReadByte();
                SpEffectCategory = (BehaviorCategory)reader.ReadByte();
                Pad = reader.ReadBytes(1);
                VagrantItemLotId = reader.ReadInt32();
                VagrantBonusEneDropItemLotId = reader.ReadInt32();
                VagrantItemEneDropItemLotId = reader.ReadInt32();
                BitFields = reader.ReadBytes(1);
                Pad1 = reader.ReadBytes(3);
            }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:30,代码来源:Accessory.cs

示例8: ModelDetailLevel

        internal ModelDetailLevel(ModelMesh mesh, int index, AssetLoader loader, int dataOffset, ArrayBackedList<byte> bufferData)
            : base(mesh, index, loader)
        {
            var reader = loader.Reader;

            Mesh = mesh;

            const int indexSize = 2;

            Threshold = reader.ReadInt32();

            Unknowns.ReadInt16s(reader, IsDS1 ? 1 : 2);
            if (IsDS1) reader.RequireZeroes(2);

            IndexCount = reader.ReadInt32();
            IndexDataOffset = reader.ReadInt32() + dataOffset;
            int indexDataSize = reader.ReadInt32();
            if (indexDataSize != IndexCount * indexSize)
                throw new InvalidDataException("Index data size doesn't match the expected value from the index count.");
            reader.RequireZeroes(4 * 3);

            BufferIndexOffset = bufferData.Count;
            long reset = reader.BaseStream.Position;
            reader.BaseStream.Position = IndexDataOffset;
            bufferData.AddRange(reader, IndexCount * indexSize);
            reader.BaseStream.Position = reset;
        }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:27,代码来源:ModelDetailLevel.cs

示例9: Throw

            internal Throw(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                AtkChrId = reader.ReadInt32();
                DefChrId = reader.ReadInt32();
                Dist = reader.ReadSingle();
                DiffAngMin = reader.ReadSingle();
                DiffAngMax = reader.ReadSingle();
                UpperYRange = reader.ReadSingle();
                LowerYRange = reader.ReadSingle();
                DiffAngMyToDef = reader.ReadSingle();
                ThrowTypeId = reader.ReadInt32();
                AtkAnimId = reader.ReadInt32();
                DefAnimId = reader.ReadInt32();
                EscHp = reader.ReadUInt16();
                SelfEscCycleTime = reader.ReadUInt16();
                SphereCastRadiusRateTop = reader.ReadUInt16();
                SphereCastRadiusRateLow = reader.ReadUInt16();
                PadType = (ThrowPadType)reader.ReadByte();
                AtkEnableState = (ThrowEnableState)reader.ReadByte();
                AtkSorbDmyId = reader.ReadByte();
                DefSorbDmyId = reader.ReadByte();
                ThrowType = (ThrowType)reader.ReadByte();
                SelfEscCycleCnt = reader.ReadByte();
                DmyHasChrDirType = (ThrowDmyCharacterDirectionType)reader.ReadByte();
                BitFields = reader.ReadBytes(1);
                Pad1 = reader.ReadBytes(4);
            }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:30,代码来源:Throw.cs

示例10: Effect

        internal Effect(AssetLoader loader)
            : base(loader)
        {
            var reader = loader.Reader;

            loader.ExpectMagic(Magic);
            loader.Expect(0x10000);
            loader.Expect(ContentStart);

            int offsetOffset = reader.ReadInt32();
            int pointerCount = reader.ReadInt32();
            HashSet<int> pointers = new HashSet<int>();
            int functionCount = reader.ReadInt32();
            HashSet<int> functions = new HashSet<int>();

            loader.Position = offsetOffset;
            for (int index = 0; index < pointerCount; index++)
                pointers.Add(reader.ReadInt32());
            for (int index = 0; index < functionCount; index++)
                functions.Add(reader.ReadInt32());

            loader.Position = ContentStart;
            int tokenCount = (offsetOffset - ContentStart) / 4;
            Tokens = new Codex<EffectToken>(tokenCount);
            for (int index = 0; index < tokenCount; index++)
                Tokens.Add(new EffectToken(reader, pointers, functions));
            for (int index = 0; index < tokenCount; index++)
                Tokens[index].Link(Tokens);

            Instructions = new Codex<EffectInstruction>();
            for (int index = 0; index < tokenCount; )
                Instructions.Add(new EffectInstruction(Tokens, ref index));
        }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:33,代码来源:Effect.cs

示例11: Palette

 internal Palette(AssetManager manager, AssetLoader loader)
     : base(manager, loader.Name)
 {
     using (var reader = loader.Reader) {
         while (!loader.AtEnd)
             ColorsMutable.Add(Color.FromArgb(reader.ReadByte(), reader.ReadByte(), reader.ReadByte()));
     }
 }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:8,代码来源:Palette.cs

示例12: PaletteArchive

 internal PaletteArchive(AssetLoader loader)
     : base(loader)
 {
     for (int index = 0; index < 8; index++) {
             PaletteAsset asset = PaletteAsset.ReadRgb(Manager, "Palette " + index, loader.Reader, 256, 63);
             AddChild(asset);
         }
 }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:8,代码来源:PaletteArchive.cs

示例13: LoadMatch

        public override LoadMatchStrength LoadMatch(AssetLoader loader)
        {
            string filename = Path.GetFileName(loader.Name);

            if (string.Equals(filename, Constants.PaletteStatic, StringComparison.InvariantCultureIgnoreCase))
                return LoadMatchStrength.Medium;
            if (loader.Context is LibraryRecord && string.Equals(Path.GetFileName(loader.Context.Parent.Name), Constants.PaletteLibrary, StringComparison.InvariantCultureIgnoreCase))
                return LoadMatchStrength.Medium;
            return LoadMatchStrength.None;
        }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:10,代码来源:Palette.cs

示例14: LoadMatch

 public override LoadMatchStrength LoadMatch(AssetLoader loader)
 {
     if (loader.Length != 8 * 768)
         return LoadMatchStrength.None;
     byte[] data = loader.Reader.ReadBytes(8 * 768);
     foreach (byte value in data)
         if (value > 63)
             return LoadMatchStrength.None;
     return LoadMatchStrength.Weak;
 }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:10,代码来源:PaletteArchive.cs

示例15: LevelOfDetail

            internal LevelOfDetail(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                Lv01_BorderDist = reader.ReadSingle();
                Lv01_PlayDist = reader.ReadSingle();
                Lv12_BorderDist = reader.ReadSingle();
                Lv12_PlayDist = reader.ReadSingle();
            }
开发者ID:Burton-Radons,项目名称:Alexandria,代码行数:10,代码来源:LevelOfDetail.cs


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