コード例 #1
0
    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);
        }
    }
コード例 #2
0
 private void SetResistanceIcon(ConstValue.ResistanceType type, string value, UISprite icon)
 {
     if (null != icon)
     {
         icon.spriteName = MonsterDetailUtil.GetResistanceSpriteName(type);
         icon.color      = MonsterDetailUtil.GetResistanceSpriteColor(value);
     }
 }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
    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);
        }
    }