| | |
| | | HideTunel(); |
| | | EventCenter.Ins.Add<float>((int)KTGMGemClient.EventType.EndlessAgentTaskDamage, OnHit); |
| | | EventCenter.Ins.Add<int>((int)KTGMGemClient.EventType.WaveLineFinish, WaveLineFinish); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | InitPortData(level); |
| | | InitWaveData(); |
| | | RefreshBoss(); |
| | | |
| | | endless_boss boss = EndlessBossData.GetDataById(waveData[0].Config.resource); |
| | | |
| | | if (boss != null) |
| | | EndlessBossCtrl.instance.RefreshBody(boss.image); |
| | | |
| | | if (!GameConfig.IsNewbie) |
| | | { |
| | |
| | | { |
| | | int tunel = waveData[i].Config.tunel; |
| | | int tunelBgId = waveData[i].Config.tunel_bg; |
| | | |
| | | // string key = $"{faZhenPath}{tunelBgId}{tunelBgId}"; |
| | | // List<GameObject> allPS; |
| | | // GameObject tmpPSObj = null; |
| | | // if (faZhenDic.ContainsKey(key)) |
| | | // { |
| | | // allPS = faZhenDic[key]; |
| | | // foreach (GameObject item in allPS) |
| | | // { |
| | | // if (item.activeSelf) |
| | | // { |
| | | // tmpPSObj = item; |
| | | // break; |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // if (tmpPSObj == null) |
| | | // { |
| | | // allPS = new List<GameObject>(); |
| | | // GameObject obj = Resources.Load<GameObject>($"{faZhenPath}{tunelBgId}{tunelBgId}"); |
| | | // GameObject faZhen = Instantiate(obj); |
| | | // tmpPSObj = faZhen; |
| | | // allPS.Add(faZhen); |
| | | // faZhenDic.Add(key, allPS); |
| | | // } |
| | | |
| | | // tmpPSObj.transform.SetParent(TunelList[tunel - 1].gameObject.transform); |
| | | // tmpPSObj.transform.localPosition = new Vector3(0, 1, 0); |
| | | // tmpPSObj.transform.localScale = new Vector3(2, 2, 2); |
| | | // TunelList[tunel - 1].gameObject.SetActive(true); |
| | | TunelList[tunel - 1].material = Resources.Load<Material>($"{tunelMaterialPath}{tunelBgId}"); |
| | | GameObject obj = Resources.Load<GameObject>($"{faZhenPath}{tunelBgId}{tunelBgId}"); |
| | | GameObject faZhen = Instantiate(obj); |
| | |
| | | return waves[waveline].StartingNode.GetNextNode().transform.position; |
| | | } |
| | | |
| | | |
| | | private void RefreshBoss() |
| | | { |
| | | if (CurrentWaveIndex > 0 || TotalWaves == 1) |
| | |
| | | int level = GameConfig.IsNewbieStart ? Level - EndlessPortData.NewbieTotalLevel : Level; |
| | | EndlessBossHPManager.instance.SetBossInfo($"第{level}关 {waveData[0].Config.boss_name}"); |
| | | } |
| | | |
| | | EndlessBossHPManager.instance.UpdateWave(TotalWaves - CurrentWaveIndex); |
| | | EndlessBossHPManager.instance.ShowHP(); |
| | | EndlessScoreManager.instance.ShowScore(); |
| | | EndlessLevelManager.instance.DropRate = EndlessPortData.GetDropRate(Level, CurrentWaveIndex); |
| | | reward tmpData = EndlessPortData.GetDropReward(Level, CurrentWaveIndex); |
| | | //if(tmpData!=null && tmpData.type == Protobuf.CURRENCY.Arenaexp)//暂时没法判断,需要新加字段 |
| | | |
| | | if (tmpData != null) |
| | | EndlessLevelManager.instance.DropCoin = tmpData != null ? tmpData.count : 0; |
| | | |
| | | } |
| | | |
| | | /// <summary> |