private void SetArousalValue(bool isArousal, bool isReturn, string rarity) { int num = int.Parse(rarity); if (isArousal) { num++; this.eggArousalIconTween.style = UITweener.Style.PingPong; this.eggArousalIconTween.PlayForward(); } else if (isReturn) { num--; this.eggArousalIconTween.style = UITweener.Style.PingPong; this.eggArousalIconTween.PlayForward(); } else { this.eggArousalIconTween.tweenFactor = 0f; this.eggArousalIconTween.style = UITweener.Style.Once; this.eggArousalIconTween.PlayReverse(); } string arousalSpriteName = MonsterDetailUtil.GetArousalSpriteName(num); if (string.IsNullOrEmpty(arousalSpriteName)) { this.eggArousalIcon.gameObject.SetActive(false); } else { this.eggArousalIcon.spriteName = arousalSpriteName; this.eggArousalIcon.gameObject.SetActive(true); } }
public static void DispArousal(string arousal, GameObject goArousal, UISprite spArousal) { if (MonsterStatusData.IsArousal(arousal)) { if (!goArousal.activeSelf) { goArousal.SetActive(true); } spArousal.spriteName = MonsterDetailUtil.GetArousalSpriteName(int.Parse(arousal)); } else if (goArousal.activeSelf) { goArousal.SetActive(false); } }
public void SetDigitamaStatus(MonsterEggStatusInfo status) { this.statusDetail.SetDigitamaStatus(status); int num = status.rare.ToInt32(); string arousalSpriteName = MonsterDetailUtil.GetArousalSpriteName(num); this.SetArousalValue(this.beforeRarity, this.beforeLabel, arousalSpriteName); if (status.isReturn) { num--; this.afterRarity.spriteName = MonsterDetailUtil.GetArousalSpriteName(num); } else if (!status.isArousal) { this.SetArousalValue(this.afterRarity, this.afterLabel, arousalSpriteName); } else { num++; this.afterRarity.spriteName = MonsterDetailUtil.GetArousalSpriteName(num); } }