Exemple #1
0
    protected override List <string> OnBuildPreloadAssets(List <string> assets = null)
    {
        base.OnBuildPreloadAssets(assets);

        PropItemInfo weaponInfo = ConfigManager.Get <PropItemInfo>(moduleLabyrinth.sneakPlayerDetail.fashion.weapon);

        LoadStateMachineEffect(assets, weaponInfo.subType, weaponInfo.ID, 0, 1);  // @TODO: 尽管现在性别绑定到职业了,但逻辑上必须使用性别
        LoadAllBuffAsset(assets);

        // enermy model
        var model = ConfigManager.Get <CreatureInfo>(moduleLabyrinth.lastSneakPlayer.GetProto());

        if (model)
        {
            assets.AddRange(model.models);
        }
        //添加装备和时装
        assets.AddRange(CharacterEquip.GetEquipAssets(moduleLabyrinth.sneakPlayerDetail.fashion));
        assets.AddRange(CharacterEquip.GetAnimatorAssets(moduleLabyrinth.sneakPlayerDetail.fashion));

        var pet = moduleLabyrinth.lastSneakPlayer.pet;

        if (pet != null && pet.itemId > 0)
        {
            var petInfo = PetInfo.Create(pet);
            if (petInfo != null)
            {
                Module_Battle.BuildPetPreloadAssets(assets, petInfo);
            }
        }

        assets.AddRange(FillLabyrithBuffAsset());
        return(assets);
    }