| | |
| | | // Start is called before the first frame update |
| | | void Start() |
| | | { |
| | | if (TDAA_SDKManager.Ins == null) |
| | | gameObject.AddComponent<TDAA_SDKManager>(); |
| | | TDAA_SDKManager.Ins.ArriveBattle();//埋点 |
| | | |
| | | TDAA_SDKManager.Ins.Statistics(4);//埋点 |
| | | InitSDK(); |
| | | |
| | | bVibrate = new bool[4]; |
| | | bVibrate[0] = bVibrate[1] = bVibrate[2] = bVibrate[3] = false; |
| | | |
| | | // 设置为顶层渲染: |
| | | countDownTextNew.transform.SetAsLastSibling(); |
| | | |
| | | if (timeStatic) |
| | | timeStatic.gameObject.SetActive(false); |
| | | EndlessBuffSelect.instance.HideBuffUI(); |
| | | EndlessBossHPManager.instance.HideHP(); |
| | | EndlessSettlement settlement = SettlementUI.transform.GetChild(0).GetComponent<EndlessSettlement>(); |
| | | settlement.Init(); |
| | | SettlementUI.SetActive(false); |
| | | EndlessMaskUI.instance.Hide(); |
| | | EndlessBossHPManager.instance.HideHP(); |
| | | |
| | | //查询是否已经做过了新手引导 |
| | | int guide = PlayerPrefs.GetInt("GemBattleGuide"); |
| | |
| | | GameConfig.EndlessPortUseSkillTowerCount = 0; |
| | | } |
| | | |
| | | private void InitSDK() |
| | | { |
| | | if (TDAA_SDKManager.Ins == null) |
| | | gameObject.AddComponent<TDAA_SDKManager>(); |
| | | TDAA_SDKManager.Ins.ArriveBattle();//埋点 |
| | | TDAA_SDKManager.Ins.Statistics(4);//埋点 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加新手引导事件 |
| | | /// </summary> |
| | |
| | | |
| | | } |
| | | |
| | | private void RemoveGuideEvent() |
| | | { |
| | | EventCenter.Ins.Remove((int)KTGMGemClient.EventType.CreateFireLv2, CreateFireLv2); |
| | | EventCenter.Ins.Remove((int)KTGMGemClient.EventType.CreateFirstWave, CreateFirstWave); |
| | | EventCenter.Ins.Remove((int)KTGMGemClient.EventType.RestartWave, RestartWave); |
| | | EventCenter.Ins.Remove<int>((int)KTGMGemClient.EventType.AddGold, AddGold); |
| | | EventCenter.Ins.Remove((int)KTGMGemClient.EventType.CreateWaterLv1, CreateWaterLv1); |
| | | EventCenter.Ins.Remove((int)KTGMGemClient.EventType.CreateSecondWave, CreateSecondWave); |
| | | EventCenter.Ins.Remove((int)KTGMGemClient.EventType.SkillRelease, SkillRelease); |
| | | EventCenter.Ins.Remove((int)KTGMGemClient.EventType.GuideFinish, NewbieGuideEnd); |
| | | } |
| | | |
| | | protected override void OnDestroy() |
| | | { |
| | | base.OnDestroy(); |
| | | RemoveGuideEvent(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 在(2,3)位置放置一个火元素的塔 |
| | | /// </summary> |