Esempio n. 1
0
    protected override List <string> OnBuildPreloadAssets(List <string> assets = null)
    {
        if (assets == null)
        {
            assets = new List <string>();
        }

        // Player shadow
        assets.Add(CombatConfig.sdefaultSelfShadow);

        // Player model
        var info = ConfigManager.Get <CreatureInfo>(TrainProtoID);

        if (info)
        {
            assets.AddRange(info.models);
        }

        // Player weapons
        Module_Battle.BuildWeaponPreloadAssets(TrainProtoID, info.gender, info.weaponID, info.weaponItemID, info.offWeaponID, info.offWeaponItemID, assets, true);


        assets.AddRange(OnBuildPVEAssets());
        int loadedCount = 0;

        foreach (var item in m_unitSceneEvents)
        {
            assets.AddRange(item.allAssets);
            loadedCount++;
            if (loadedCount >= MAX_LOADED_UNIT_SCENE_COUNT)
            {
                break;
            }
        }

        return(assets);
    }