| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using KTGMGemClient; |
| | | using UnityEngine; |
| | | |
| | | public class TDAA_SDKManager : MonoBehaviour |
| | |
| | | |
| | | maxLevel = PlayerPrefs.GetInt(maxLevelStr); |
| | | maxWave = PlayerPrefs.GetInt(maxWaveStr); |
| | | AddListener(); |
| | | } |
| | | |
| | | private void AddListener() |
| | | { |
| | | EventCenter.Ins.Add<int, int>((int)KTGMGemClient.EventType.EndlessCompletedPort, EndlessCompletedPort); |
| | | EventCenter.Ins.Add((int)KTGMGemClient.EventType.EndlessLevelCompleted, EndlessLevelCompleted); |
| | | } |
| | | /// <summary> |
| | | /// 无尽模式成功通过第*关,第*波 |
| | | /// </summary> |
| | | /// <param name="Level"></param> |
| | | /// <param name="CurrentWaveIndex"></param> |
| | | private void EndlessCompletedPort(int level, int currentWaveIndex) |
| | | { |
| | | MaxWave(level, currentWaveIndex); |
| | | WaveDone(level, currentWaveIndex); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 无尽模式完成 |
| | | /// </summary> |
| | | private void EndlessLevelCompleted() |
| | | { |
| | | OnUseSkill(GameConfig.EndlessPortUseSkillTowerCount); |
| | | OnOpenTower(GameConfig.EndlessOpenAttackTowerCount); |
| | | OnClickTowerBuyBtn(GameConfig.EndlessBuyTowerCount); |
| | | } |
| | | |
| | | public void Reset() |
| | |
| | | } |
| | | if (canSend) |
| | | { |
| | | maxLevel = level; |
| | | PlayerPrefs.SetInt(maxLevelStr, maxLevel); |
| | | maxWave = wave; |
| | | PlayerPrefs.SetInt(maxWaveStr, maxWave); |
| | | |
| | | Debug.LogError($"玩家最高打到第{level}关{wave}波"); |
| | | Dictionary<string, object> dic = new Dictionary<string, object> |
| | | { |