Exemple #1
0
    protected virtual List <string> OnBuildPreloadAssets(List <string> assets = null)
    {
        if (assets == null)
        {
            assets = new List <string>();
        }

        Module_Battle.BuildPlayerPreloadAssets(assets);

        return(assets);
    }
Exemple #2
0
    protected override List <string> OnBuildPreloadAssets(List <string> assets = null)
    {
        if (assets == null)
        {
            assets = new List <string>();
        }

        var players = LoadParam.players;

        foreach (var player in players)
        {
            Module_Battle.BuildPlayerPreloadAssets(player, assets);
        }

        return(assets);
    }
    protected override List <string> BuildPreloadAssets()
    {
        var assets = base.BuildPreloadAssets();

        assets.Add(Module_Bordlands.BORDLAND_MONSTER_ANIMATOR_NAME);
        assets.Add(headPanelName);
        assets.Add(GeneralConfigInfo.ssceneTextObject);
        assets.AddRange(Module_Battle.BuildPlayerPreloadAssets());
        if (moduleLabyrinth.labyrinthInfo)
        {
            assets.Add(moduleLabyrinth.labyrinthInfo.activeEffect);
            assets.Add(moduleLabyrinth.labyrinthInfo.inactiveEffect);
        }

        var emjioList = ConfigManager.GetAll <FaceName>();

        for (int i = 0; i < emjioList.Count; i++)
        {
            assets.Add(emjioList[i]?.head_icon);
        }

        return(assets);
    }
    protected override List <string> OnBuildPreloadAssets(List <string> assets = null)
    {
        base.OnBuildPreloadAssets(assets);

        if (assets == null)
        {
            assets = new List <string>();
        }
        var member = moduleTeam.members;

        if (member != null)
        {
            foreach (var m in member)
            {
                if (m.roleId == modulePlayer.id_)
                {
                    continue;
                }
                Module_Battle.BuildPlayerPreloadAssets(m, assets);
            }
        }

        return(assets);
    }
Exemple #5
0
    private void OnPostGmLockClass(Event_ e)
    {
        var mm = (bool)e.param1;

        moduleGlobal.LockUI("拼命加载中...", 0.3f, 35.0f);
        PrepareAssets(Module_Battle.BuildPlayerPreloadAssets(), f =>
        {
            moduleGlobal.UnLockUI();

            if (!f || !this)
            {
                return;
            }

            if (!mm || !m_player)
            {
                var info = modulePlayer.BuildPlayerInfo();

                var old = m_player;
                var pet = m_player?.pet;
                var pos = m_player ? m_player.position_ : playerStart;
                var dir = m_player ? m_player.direction : CreatureDirection.FORWARD;

                m_player           = Creature.Create(info, pos, new Vector3(0, 90, 0), true, "player", modulePlayer.name_);
                m_player.roleId    = modulePlayer.id_;
                m_player.roleProto = modulePlayer.proto;
                m_player.position  = pos;
                m_player.direction = dir;
                m_player.teamIndex = old ? old.teamIndex : 0;
                m_player.roleId    = old ? old.roleId : modulePlayer.id_;

                if (old)
                {
                    m_player.regenRage          = old.regenRage;
                    m_player.regenRagePercent   = old.regenRagePercent;
                    m_player.regenHealth        = old.regenHealth;
                    m_player.regenHealthPercent = old.regenHealthPercent;
                    m_player.attack             = old.attack;
                }

                m_player.pet = pet;
                if (pet)
                {
                    pet.ParentCreature = m_player;
                }

                if (old)
                {
                    old.Destroy();
                }

                CharacterEquip.ChangeCloth(m_player, moduleEquip.currentDressClothes);

                _SetDOFFocusTarget(m_player.transform);

                CreatePlayerAudioListener();
            }
            else
            {
                m_player.elementType = (int)modulePlayer.elementType;
                m_player.UpdateWeapon(moduleEquip.weaponID, moduleEquip.weaponItemID);
            }
        });
    }