public void RefreshExpItem(uint lastLevel, uint lastExp, uint curLevel, uint curExp, float rewardExp, GUILevelExpUpAnimation.ExpCallback getInfoExp, object obj = null) { this.levelLb.gameObject.SetActive(true); this.levelSlider.gameObject.SetActive(true); this.levelLb.text = string.Format("Lv {0}", lastLevel); uint num = getInfoExp(curLevel, obj); if (num == 0u) { num = curExp; } if (curExp >= num) { this.levelSlider.value = 1f; this.levelSliderFg.spriteName = "lvlFg1"; this.levelSliderText.text = "100%"; } else { this.levelSlider.value = curExp / num; this.levelSliderFg.spriteName = "lvlFg0"; this.levelSliderText.text = string.Format("{0}%", Mathf.FloorToInt(this.levelSlider.value * 100f)); } if (lastLevel < curLevel) { this.levelImg.SetActive(true); } }
public IEnumerator PlayExpAnim(uint lastLevel, uint lastExp, uint curLevel, uint curExp, float rewardExp, GUILevelExpUpAnimation.ExpCallback getInfoExp, float duration, object obj = null) { return null; //GUILevelExpUpAnimation.<PlayExpAnim>c__Iterator50 <PlayExpAnim>c__Iterator = new GUILevelExpUpAnimation.<PlayExpAnim>c__Iterator50(); //<PlayExpAnim>c__Iterator.getInfoExp = getInfoExp; //<PlayExpAnim>c__Iterator.lastLevel = lastLevel; //<PlayExpAnim>c__Iterator.obj = obj; //<PlayExpAnim>c__Iterator.curExp = curExp; //<PlayExpAnim>c__Iterator.rewardExp = rewardExp; //<PlayExpAnim>c__Iterator.duration = duration; //<PlayExpAnim>c__Iterator.lastExp = lastExp; //<PlayExpAnim>c__Iterator.curLevel = curLevel; //<PlayExpAnim>c__Iterator.<$>getInfoExp = getInfoExp; //<PlayExpAnim>c__Iterator.<$>lastLevel = lastLevel; //<PlayExpAnim>c__Iterator.<$>obj = obj; //<PlayExpAnim>c__Iterator.<$>curExp = curExp; //<PlayExpAnim>c__Iterator.<$>rewardExp = rewardExp; //<PlayExpAnim>c__Iterator.<$>duration = duration; //<PlayExpAnim>c__Iterator.<$>lastExp = lastExp; //<PlayExpAnim>c__Iterator.<$>curLevel = curLevel; //<PlayExpAnim>c__Iterator.<>f__this = this; //return <PlayExpAnim>c__Iterator; }
protected override void OnPostLoadGUI() { this.backMenu = base.RegisterClickEvent("backMenu", new UIEventListener.VoidDelegate(this.OnReturnClick), base.gameObject); this.backMenu.gameObject.SetActive(false); this.result = base.transform.Find("result").GetComponent<UISprite>(); this.result.gameObject.SetActive(true); this.result.spriteName = ((GUIKingRewardResultScene.PveResultData == null) ? "Failure" : "Victory_Txt"); this.Failure = GameUITools.FindGameObject("Failure", base.gameObject); this.Failure.AddComponent<GUIFailureTipsGroup>(); this.Failure.SetActive(false); this.Victory = GameUITools.FindGameObject("Victory", base.gameObject); this.Victory.SetActive(false); GameObject gameObject = GameUITools.FindGameObject("infoBg", this.Victory); this.time = gameObject.transform.FindChild("Time").gameObject; this.time.SetActive(false); this.exp = gameObject.transform.FindChild("exp").gameObject; this.exp.SetActive(false); this.timeLb = this.time.GetComponent<UILabel>(); this.expLabel = this.exp.transform.Find("num").GetComponent<UILabel>(); GameObject gameObject2 = gameObject.transform.FindChild("Level").gameObject; this.levelAnimation = gameObject2.AddComponent<GUILevelExpUpAnimation>(); this.levelAnimation.Init(); this.RewardItem = GameUITools.FindGameObject("Reward", this.Victory); }
private void CreateObjects() { this.backMenu = base.RegisterClickEvent("backMenu", new UIEventListener.VoidDelegate(this.OnReturnClick), base.gameObject); this.backMenu.gameObject.SetActive(false); this.result = base.transform.Find("result").GetComponent<UISprite>(); this.result.gameObject.SetActive(true); this.result.spriteName = ((!GUIPillageResultScene.PillageResultWin) ? "Failure" : "Victory_Txt"); GameObject gameObject = GameUITools.FindGameObject("infoBg", base.gameObject); this.time = gameObject.transform.FindChild("time").gameObject; this.time.SetActive(false); this.gold = gameObject.transform.FindChild("gold").gameObject; this.gold.SetActive(false); this.exp = gameObject.transform.FindChild("exp").gameObject; this.exp.SetActive(false); this.timeLabel = this.time.transform.Find("num").GetComponent<UILabel>(); this.goldLabel = this.gold.transform.Find("num").GetComponent<UILabel>(); this.expLabel = this.exp.transform.Find("num").GetComponent<UILabel>(); GameObject gameObject2 = gameObject.transform.FindChild("Level").gameObject; this.levelAnimation = gameObject2.AddComponent<GUILevelExpUpAnimation>(); gameObject2.SetActive(false); this.levelAnimation.Init(); this.Failure = GameUITools.FindGameObject("Failure", base.gameObject); this.Failure.AddComponent<GUIFailureTipsGroup>(); this.Failure.SetActive(false); this.Victory = GameUITools.FindGameObject("Victory", base.gameObject); this.Victory.SetActive(false); this.VictoryTips = this.Victory.transform.Find("Tips").GetComponent<UILabel>(); this.RewardItem = GameUITools.FindGameObject("Reward", base.gameObject); this.RewardItem.SetActive(false); }
private void CreateObjects() { this.fadeBG = base.RegisterClickEvent("FadeBG", new UIEventListener.VoidDelegate(this.OnFadeBGClick), null); this.fadeBG.SetActive(false); this.btnGroup = base.transform.Find("ButtonGroup").gameObject; this.mResurrectBtn = base.RegisterClickEvent("resurrect", new UIEventListener.VoidDelegate(this.OnRechallengeClick), this.btnGroup); this.btnLevel = base.RegisterClickEvent("Last", new UIEventListener.VoidDelegate(this.OnBtnLevelClick), this.btnGroup); base.RegisterClickEvent("backPveMenu", new UIEventListener.VoidDelegate(this.OnReturnClick), this.btnGroup); this.btnGroup.SetActive(false); this.victoryPanel = base.transform.Find("VictoryPanel").gameObject; this.victoryPanel.SetActive(false); this.victoryContent = this.victoryPanel.transform.Find("victory").gameObject; this.starGroup = this.victoryContent.transform.Find("StartGroup").gameObject; for (int i = 0; i < 3; i++) { this.starSprite[i] = this.starGroup.transform.Find(string.Format("start{0}", i)).gameObject; this.starSprite[i].SetActive(false); } TweenScale component = this.victoryContent.transform.Find("text").GetComponent<TweenScale>(); this.content = component.gameObject; this.content.SetActive(false); this.timeLb = component.transform.Find("Time").GetComponent<UILabel>(); this.timeLb.gameObject.SetActive(false); this.goldLb = component.transform.Find("Gold").GetComponent<UILabel>(); this.goldLb.gameObject.SetActive(false); this.expLb = component.transform.Find("Exp").GetComponent<UILabel>(); this.expLb.gameObject.SetActive(false); this.levelGrp = component.transform.Find("Level").gameObject; this.levelGrp.SetActive(false); this.levelAnimation = this.levelGrp.AddComponent<GUILevelExpUpAnimation>(); this.levelAnimation.Init(); this.goldDouble = this.goldLb.transform.Find("Label").GetComponent<UITweener>(); this.goldDouble.gameObject.SetActive(false); this.expDouble = this.expLb.transform.Find("Label").GetComponent<UITweener>(); this.expDouble.gameObject.SetActive(false); this.victoryFirst = this.victoryContent.transform.Find("victory_first").gameObject; this.victoryFirst.SetActive(false); this.treasureBox = this.victoryPanel.transform.Find("Treasure-Box").gameObject; this.treasureBox.SetActive(false); this.cardGroup = this.victoryPanel.transform.Find("CardGroup").gameObject; this.cardGroup.SetActive(false); }