| | |
| | | transform.Find("Panel/Bottom").GetComponent<RectTransform>().anchoredPosition += tmpOffect; |
| | | transform.Find("Panel/TowerBuyBtn").GetComponent<RectTransform>().anchoredPosition += tmpOffect; |
| | | transform.Find("Panel/SwitchSpeed").GetComponent<RectTransform>().anchoredPosition += tmpOffect; |
| | | transform.Find("Panel/BuffPreviewButton").GetComponent<RectTransform>().anchoredPosition += tmpOffect; |
| | | |
| | | transform.Find("Panel/BossHPBar").GetComponent<RectTransform>().anchoredPosition -= tmpOffect * 0.5f; |
| | | transform.Find("Panel/Score").GetComponent<RectTransform>().anchoredPosition -= tmpOffect * 0.5f; |
| | |
| | | |
| | | AudioSourceManager.Ins.Play(AudioEnum.BGM2); |
| | | |
| | | fireSkillBgImg = transform.Find("Panel/Energy/FireSkillBg").GetComponent<Image>(); |
| | | transform.Find("Panel/Energy/FireSkillBg/SkillBtn").GetComponent<Button>().onClick.AddListener(OnClickFireSkillBtn); |
| | | fireSkillLevelText = transform.Find("Panel/Energy/FireSkillBg/Level/Text").GetComponent<Text>(); |
| | | skillSliderValueRect = transform.Find("Panel/Energy/FireSkillBg/SliderValue").GetComponent<RectTransform>(); |
| | | skillSliderVStartP = skillSliderValueRect.anchoredPosition; |
| | | skillSliderVStartHeight = skillSliderValueRect.sizeDelta; |
| | | |
| | | transform.Find("Panel/Energy").gameObject.SetActive(false); |
| | | skillPS1 = transform.Find("Panel/Energy/FireSkillBg/Effect_UI_JiNengTuBiao/03 (9)").GetComponent<ParticleSystem>(); |
| | | skillPS2 = transform.Find("Panel/Energy/FireSkillBg/Effect_UI_JiNengTuBiao_02/03 (16)").GetComponent<ParticleSystem>(); |
| | | |
| | | transform.Find("Panel/BuffPreviewButton").gameObject.SetActive(false); |
| | | transform.Find("Panel/SwitchSpeed").gameObject.SetActive(false); |
| | | |
| | | GameConfig.EnergyCount = 0; |
| | | GameConfig.SkillLevel = 1; |
| | | |
| | | //CalculateSkillSliderValue(); |
| | | transform.Find("Panel/Energy").gameObject.SetActive(false); |
| | | |
| | | EventCenter.Ins.Add<int>((int)KTGMGemClient.EventType.EnergyUp, EnergyUp); |
| | | EventCenter.Ins.Add((int)KTGMGemClient.EventType.SkillLevelUpBuff, SkillLevelUpBuff); |
| | |
| | | |
| | | private void CheckIsNewbie() |
| | | { |
| | | //GameConfig.IsNewbie = false; |
| | | int guide = PlayerPrefs.GetInt("GemBattleGuide"); |
| | | GameConfig.IsNewbie = guide == 0; |
| | | GameConfig.IsNewbieStart = GameConfig.IsNewbie; |
| | | |
| | | if (GameConfig.IsNewbie) |
| | | { |
| | | Debug.Log("开始新手引导"); |
| | |
| | | GameObject guideObj = Instantiate(Resources.Load<GameObject>("UI/Guide/GuidePanel"), transform.Find("Panel")); |
| | | guideObj.GetComponent<RectTransform>().offsetMin += tmpOffect; |
| | | AddGuideEvent(); |
| | | |
| | | transform.Find("Panel/SwitchSpeed").gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | private void JsonDataReadDone() |
| | | { |
| | | Debug.Log("设置激活"); |
| | | transform.Find("Panel/Energy").gameObject.SetActive(true); |
| | | transform.Find("Panel/BuffPreviewButton").gameObject.SetActive(true); |
| | | |
| | | if (!GameConfig.IsNewbie) |
| | | { |
| | | transform.Find("Panel/BuffPreviewButton").gameObject.SetActive(true); |
| | | transform.Find("Panel/SwitchSpeed").gameObject.SetActive(true); |
| | | } |
| | | |
| | | fireSkillCost = JsonDataCenter.GetSkillLevelInfo(fireSkillID, GameConfig.SkillLevel).cost; |
| | | bombSkillCost = JsonDataCenter.GetSkillLevelInfo(bombSkillID, GameConfig.SkillLevel).cost; |
| | | |
| | |
| | | EndlessLevelManager.instance.RestartWave(); |
| | | GameConfig.IsNewbie = false; |
| | | transform.Find("Panel/SwitchSpeed").gameObject.SetActive(true); |
| | | |
| | | transform.Find("Panel/BuffPreviewButton").gameObject.SetActive(true); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | private Color normalColor = new Color(1.0f, 1.0f, 1.0f, 1.0f); |
| | | private Color disColor = new Color(1.0f, 1.0f, 1.0f, 0); |
| | | private Text fireSkillLevelText; |
| | | |
| | | |
| | | private Image fireSkillBgImg; |
| | | private ParticleSystem skillPS1, skillPS2; |
| | | |
| | | /// <summary> |
| | | /// 点击火技能 |
| | |
| | | { |
| | | |
| | | Debug.Log("能量已满"); |
| | | |
| | | if (fireSkillBgImg.color != disColor) |
| | | { |
| | | fireSkillBgImg.color = disColor; |
| | | } |
| | | skillPS1.Play(); |
| | | skillPS2.Play(); |
| | | } |
| | | else |
| | | { |
| | | Debug.Log("能量达到一次使用"); |
| | | |
| | | if (fireSkillBgImg.color != normalColor) |
| | | { |
| | | fireSkillBgImg.color = normalColor; |
| | | } |
| | | if (skillPS1.isPlaying) skillPS1.Stop(); |
| | | if (!skillPS2.isPlaying) skillPS2.Play(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (fireSkillBgImg.color != normalColor) |
| | | { |
| | | fireSkillBgImg.color = normalColor; |
| | | } |
| | | if (skillPS1.isPlaying) skillPS1.Stop(); |
| | | if (skillPS2.isPlaying) skillPS2.Stop(); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | RectTransform skillSliderValueRect; |