示例#1
0
 public void AddList(GemLevel level, int spawnPercentage)
 {
     for (int i = 0; i < spawnPercentage; i++)
     {
         gemLevelList.Add(level);
     }
 }
示例#2
0
    public string RandomGetGemList()
    {
        int random = Random.Range(zero, gemLevelList.Count);

        randomLevel = gemLevelList[random];
        int randomColor = Random.Range(0, colorKinds);

        GemColor color = (GemColor)randomColor;

        string name = randomLevel.ToDesc() + color.ToDesc();

        return(name);
    }
示例#3
0
 private void SetGemLevel(int level)
 {
     if (level <= 3)
     {
         _gemLevel = GemLevel.Chipped;
     }
     else if (level <= 6)
     {
         _gemLevel = GemLevel.Dull;
     }
     else
     {
         _gemLevel = GemLevel.Normal;
     }
 }
示例#4
0
        public override int GetHashCode()
        {
            var hash = 3;

            hash = 53 * hash + (Name?.GetHashCode() ?? 0);
            hash = 53 * hash + (TypeLine?.GetHashCode() ?? 0);
            hash = 53 * hash + (Variation?.GetHashCode() ?? 0);
            hash = 53 * hash + (Links.GetHashCode());
            hash = 53 * hash + (GemLevel.GetHashCode());
            hash = 53 * hash + (GemQuality.GetHashCode());
            hash = 53 * hash + (MapTier.GetHashCode());
            hash = 53 * hash + (GemCorrupted.GetHashCode());
            hash = 53 * hash + FrameType;

            return(hash);
        }
示例#5
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (typeof(Key) != obj.GetType())
            {
                return(false);
            }

            var other = (Key)obj;

            if (FrameType != other.FrameType)
            {
                return(false);
            }

            if (!Name?.Equals(other.Name) ?? (other.Name != null))
            {
                return(false);
            }

            if (!TypeLine?.Equals(other.TypeLine) ?? (other.TypeLine != null))
            {
                return(false);
            }

            if (!Variation?.Equals(other.Variation) ?? (other.Variation != null))
            {
                return(false);
            }

            if (!Links?.Equals(other.Links) ?? (other.Links != null))
            {
                return(false);
            }

            if (!GemLevel?.Equals(other.GemLevel) ?? (other.GemLevel != null))
            {
                return(false);
            }

            if (!GemQuality?.Equals(other.GemQuality) ?? (other.GemQuality != null))
            {
                return(false);
            }

            if (!MapTier?.Equals(other.MapTier) ?? (other.MapTier != null))
            {
                return(false);
            }

            if (!GemCorrupted?.Equals(other.GemCorrupted) ?? (other.GemCorrupted != null))
            {
                return(false);
            }

            return(true);
        }