public void AddList(GemLevel level, int spawnPercentage) { for (int i = 0; i < spawnPercentage; i++) { gemLevelList.Add(level); } }
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); }
private void SetGemLevel(int level) { if (level <= 3) { _gemLevel = GemLevel.Chipped; } else if (level <= 6) { _gemLevel = GemLevel.Dull; } else { _gemLevel = GemLevel.Normal; } }
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); }
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); }