| | |
| | | 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; |
| | | |
| | | skillPS1.SetActive(false); |
| | | skillPS2.SetActive(false); |
| | | |
| | | transform.Find("Panel/BuffPreviewButton").gameObject.SetActive(false); |
| | | transform.Find("Panel/SwitchSpeed").gameObject.SetActive(false); |
| | |
| | | int guide = PlayerPrefs.GetInt("GemBattleGuide"); |
| | | GameConfig.IsNewbie = guide == 0; |
| | | |
| | | //GameConfig.IsNewbie = true; |
| | | |
| | | GameConfig.IsNewbieStart = GameConfig.IsNewbie; |
| | | |
| | | if (GameConfig.IsNewbie) |
| | | { |
| | | EndlessRandomTower.instance.SetCountDown(false); |
| | | |
| | | Debug.Log("开始新手引导"); |
| | | GameConfig.CanDragTower = false; |
| | | Pause(); |
| | | HideUIMask(); |
| | | countDownTextNew.text = ""; |
| | | countDownTextNew.gameObject.SetActive(false); |
| | | //GameObject go = Resources.Load<GameObject>("UI/Guide/GuidePanel"); |
| | | GameObject guideObj = Instantiate(Resources.Load<GameObject>("UI/Guide/GuidePanel"), transform.Find("Panel")); |
| | | GameObject prefab = Resources.Load<GameObject>("UI/Guide/GuidePanel"); |
| | | GameObject guideObj = Instantiate(prefab, transform.Find("Panel")); |
| | | guideObj.GetComponent<RectTransform>().offsetMin += tmpOffect; |
| | | AddGuideEvent(); |
| | | } |
| | |
| | | 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; |
| | | |
| | | /// <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); |
| | | |
| | | //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 (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 (skillPS1.isPlaying) skillPS1.Stop(); |
| | | // if (skillPS2.isPlaying) skillPS2.Stop(); |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | public bool IsGameRunning { get { return !isPause; } } |
| | | |
| | | private bool isUpgradeTowerLevel; |
| | | |
| | | // Update is called once per frame |
| | | void Update() |
| | | { |
| | |
| | | if (bGameStart) |
| | | { |
| | | startTime += Time.deltaTime; |
| | | |
| | | // if (!isUpgradeTowerLevel && startTime >= JsonDataCenter.DOUBLE_GEM_TIME) |
| | | // { |
| | | // EndlessRandomTower.instance.UpdateDescDisplay(); |
| | | // isUpgradeTowerLevel = true; |
| | | // } |
| | | |
| | | timeTextNew.text = ConvertTime((float)Math.Ceiling(startTime)); |
| | | } |
| | | |