| | |
| | | |
| | | if (root == null) |
| | | { |
| | | if (Application.platform == RuntimePlatform.WindowsEditor || |
| | | Application.platform == RuntimePlatform.WindowsPlayer) |
| | | { |
| | | GameConfig.useSDK = false; |
| | | GMBtn.SetActive(true); |
| | | } |
| | | else |
| | | { |
| | | GMBtn.SetActive(false); |
| | | } |
| | | |
| | | root = new GameObject("ManagerRoot"); |
| | | |
| | | root.AddComponent<DoNotDestory>(); |
| | | root.AddComponent<MasterSocket>(); |
| | | root.AddComponent<TDAA_SDKManager>(); |
| | |
| | | InitSDK(); |
| | | bGameStart = false; |
| | | bFirstLoaded = false; |
| | | GameConfig.IsUpgradeTowerLevel = false; |
| | | GameConfig.CreateRandomTower = true; |
| | | |
| | | bVibrate = new bool[4]; |
| | |
| | | skillSliderVStartP = skillSliderValueRect.anchoredPosition; |
| | | skillSliderVStartHeight = skillSliderValueRect.sizeDelta; |
| | | |
| | | skillPS1 = transform.Find("Panel/Energy/FireSkillBg/Effect_UI_JiNengTuBiao/03").GetComponent<ParticleSystem>(); |
| | | skillPS2 = transform.Find("Panel/Energy/FireSkillBg/Effect_UI_JiNengTuBiao_02/03").GetComponent<ParticleSystem>(); |
| | | skillPS1 = transform.Find("Panel/Energy/FireSkillBg/Effect_UI_JiNengTuBiao/03").gameObject; |
| | | skillPS2 = transform.Find("Panel/Energy/FireSkillBg/Effect_UI_JiNengTuBiao_02/03").gameObject; |
| | | skillPS3 = transform.Find("Panel/Energy/FireSkillBg/Effect_UI_JiNengTuBiao_03/03 (8)").gameObject; |
| | | |
| | | skillPS1.SetActive(false); |
| | | skillPS2.SetActive(false); |
| | | skillPS3.SetActive(false); |
| | | |
| | | transform.Find("Panel/BuffPreviewButton").gameObject.SetActive(false); |
| | | transform.Find("Panel/SwitchSpeed").gameObject.SetActive(false); |
| | | GMBtn.SetActive(false); |
| | | |
| | | |
| | | GameConfig.EnergyCount = 0; |
| | | GameConfig.SkillLevel = 1; |
| | |
| | | |
| | | if (GameConfig.IsNewbie) |
| | | { |
| | | EndlessRandomTower.instance.SetCountDown(false); |
| | | |
| | | Debug.Log("开始新手引导"); |
| | | GameConfig.CanDragTower = false; |
| | | Pause(); |
| | |
| | | { |
| | | transform.Find("Panel/BuffPreviewButton").gameObject.SetActive(true); |
| | | transform.Find("Panel/SwitchSpeed").gameObject.SetActive(true); |
| | | GMBtn.SetActive(true); |
| | | // cx test |
| | | // GMBtn.SetActive(true); |
| | | } |
| | | |
| | | fireSkillCost = JsonDataCenter.GetSkillLevelInfo(fireSkillID, GameConfig.SkillLevel).cost; |
| | |
| | | private Color disColor = new Color(1.0f, 1.0f, 1.0f, 0); |
| | | private Text fireSkillLevelText; |
| | | private Image fireSkillBgImg; |
| | | private ParticleSystem skillPS1, skillPS2; |
| | | private GameObject skillPS1, skillPS2, skillPS3; |
| | | |
| | | /// <summary> |
| | | /// 点击火技能 |
| | |
| | | EndlessWaveLineManager.instance.PlayAllWaveLineEffect(); |
| | | AgentInsManager.instance.ExecAllWavelineAttack(fireSkillID, GameConfig.SkillLevel, false); |
| | | ++GameConfig.EndlessPortUseSkillTowerCount; |
| | | } |
| | | else |
| | | { |
| | | AudioSourceManager.Ins.Play(AudioEnum.UIDisable); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (GameConfig.EnergyCount == energyMax) |
| | | { |
| | | |
| | | Debug.Log("能量已满"); |
| | | //Debug.Log("能量已满"); |
| | | if (fireSkillBgImg.color != disColor) |
| | | { |
| | | fireSkillBgImg.color = disColor; |
| | | } |
| | | skillPS1.Play(); |
| | | skillPS2.Play(); |
| | | if (!skillPS1.activeSelf) skillPS1.SetActive(true); |
| | | if (!skillPS2.activeSelf) skillPS2.SetActive(true); |
| | | if (skillPS3.activeSelf) skillPS3.SetActive(false); |
| | | //skillPS1.Play(); |
| | | //skillPS2.Play(); |
| | | } |
| | | else |
| | | { |
| | | Debug.Log("能量达到一次使用"); |
| | | //Debug.Log("能量达到一次使用"); |
| | | if (fireSkillBgImg.color != normalColor) |
| | | { |
| | | fireSkillBgImg.color = normalColor; |
| | | } |
| | | if (skillPS1.isPlaying) skillPS1.Stop(); |
| | | if (!skillPS2.isPlaying) skillPS2.Play(); |
| | | if (skillPS1.activeSelf) skillPS1.SetActive(false); |
| | | if (!skillPS2.activeSelf) skillPS2.SetActive(true); |
| | | if (!skillPS3.activeSelf) skillPS3.SetActive(true); |
| | | |
| | | //if (skillPS1.isPlaying) skillPS1.Stop(); |
| | | //if (!skillPS2.isPlaying) skillPS2.Play(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //Debug.Log("能量不够"); |
| | | if (fireSkillBgImg.color != normalColor) |
| | | { |
| | | fireSkillBgImg.color = normalColor; |
| | | } |
| | | if (skillPS1.isPlaying) skillPS1.Stop(); |
| | | if (skillPS2.isPlaying) skillPS2.Stop(); |
| | | if (skillPS1.activeSelf) skillPS1.SetActive(false); |
| | | if (skillPS2.activeSelf) skillPS2.SetActive(false); |
| | | if (skillPS3.activeSelf) skillPS3.SetActive(false); |
| | | // if (skillPS1.isPlaying) skillPS1.Stop(); |
| | | // if (skillPS2.isPlaying) skillPS2.Stop(); |
| | | |
| | | } |
| | | } |
| | |
| | | { |
| | | startTime += Time.deltaTime; |
| | | |
| | | if (!isUpgradeTowerLevel && startTime >= JsonDataCenter.DOUBLE_GEM_TIME) |
| | | { |
| | | EndlessGameUI.instance.UpgradeAllTowerMinLevel(1); |
| | | isUpgradeTowerLevel = true; |
| | | } |
| | | // if (!isUpgradeTowerLevel && startTime >= JsonDataCenter.DOUBLE_GEM_TIME) |
| | | // { |
| | | // EndlessRandomTower.instance.UpdateDescDisplay(); |
| | | // isUpgradeTowerLevel = true; |
| | | // } |
| | | |
| | | timeTextNew.text = ConvertTime((float)Math.Ceiling(startTime)); |
| | | } |