Ejemplo n.º 1
0
    public string SetReasonString(UILabel _lbReason, ABLE_BUY_REASON _eReason)
    {
        string strRet = "";

        switch (_eReason)
        {
        case ABLE_BUY_REASON.COST:
            strRet = "コスト不足";
            break;

        case ABLE_BUY_REASON.GOLD:
            strRet = "ゴールド不足";
            break;

        case ABLE_BUY_REASON.TICKET:
            strRet = "チケット不足";
            break;

        case ABLE_BUY_REASON.LIMIT:
            strRet = "これ以上購入できません";
            break;

        default:
            strRet = "";
            break;
        }
        _lbReason.text = strRet;
        return(strRet);
    }
Ejemplo n.º 2
0
    public string SetReasonSprite(UISprite _sprite, ABLE_BUY_REASON _eReason)
    {
        string strRet = "";

        switch (_eReason)
        {
        case ABLE_BUY_REASON.COST:
            strRet = "no_cost";
            break;

        case ABLE_BUY_REASON.GOLD:
            strRet = "no_gold";
            break;

        case ABLE_BUY_REASON.TICKET:
            strRet = "no_ticket";
            break;

        case ABLE_BUY_REASON.LIMIT:
            strRet = "これ以上購入できません";
            break;

        default:
            strRet          = "";
            _sprite.enabled = false;
            break;
        }

        // 別に突っ込んでもいいんだけどね
        if (strRet.Equals("") == false)
        {
            _sprite.spriteName = strRet;
        }

        return(strRet);
    }