예제 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (LevelId != 0)
            {
                hash ^= LevelId.GetHashCode();
            }
            if (Star != 0)
            {
                hash ^= Star.GetHashCode();
            }
            if (BuyCount != 0)
            {
                hash ^= BuyCount.GetHashCode();
            }
            if (Count != 0)
            {
                hash ^= Count.GetHashCode();
            }
            if (MaxScore != 0)
            {
                hash ^= MaxScore.GetHashCode();
            }
            if (ResetTime != 0L)
            {
                hash ^= ResetTime.GetHashCode();
            }
            if (ActivityId != 0)
            {
                hash ^= ActivityId.GetHashCode();
            }
            return(hash);
        }
예제 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (BuyCount != 0)
            {
                hash ^= BuyCount.GetHashCode();
            }
            if (EndTime != 0L)
            {
                hash ^= EndTime.GetHashCode();
            }
            if (PrizeTime != 0L)
            {
                hash ^= PrizeTime.GetHashCode();
            }
            return(hash);
        }
예제 #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (LevelId != 0)
            {
                hash ^= LevelId.GetHashCode();
            }
            if (Star != 0)
            {
                hash ^= Star.GetHashCode();
            }
            if (Count != 0)
            {
                hash ^= Count.GetHashCode();
            }
            if (ResetTime != 0L)
            {
                hash ^= ResetTime.GetHashCode();
            }
            if (MaxFraction != 0)
            {
                hash ^= MaxFraction.GetHashCode();
            }
            if (BuyCount != 0)
            {
                hash ^= BuyCount.GetHashCode();
            }
            if (FirstAwardsState != 0)
            {
                hash ^= FirstAwardsState.GetHashCode();
            }
            return(hash);
        }
예제 #4
0
    protected override void OnBecameVisible(bool oldState, bool forward)
    {
        var args = GetWindowParam(name);

        if (args != null && args.param1 is ExchangeContent)
        {
            _content = (ExchangeContent)args.param1;
        }

        var prop = ConfigManager.Get <PropItemInfo>(_content.itemId);

        Util.SetItemInfo(itemRoot, prop, 0, _content.ownCount, false);
        Util.SetText(itemRoot.GetComponent <Text>("numberdi/count"),
                     Util.Format(ConfigText.GetDefalutString(199, 8), _content.ownCount));
        Util.SetText(needCountText, Util.Format(ConfigText.GetDefalutString(199, 6), BuyCount.ToString()));
        Util.SetText(priceText, Util.Format(ConfigText.GetDefalutString(199, 7), BuyCount * prop.diamonds));
        Util.SetText(levelText, Util.Format(ConfigText.GetDefalutString(199, 10), prop.buyLevel));
        priceText.color = ColorGroup.GetColor(ColorManagerType.IsMoneyEnough, IsMoneyEnough);
        bool level = modulePlayer.level >= prop.buyLevel ? true : false;

        levelText.color = level ? Color.white : Color.red;

        exchangeButton?.SetInteractable(IsMoneyEnough && level);
    }