| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace DamageNumbersPro
- {
- [System.Serializable]
- public struct DigitSettings
- {
- public DigitSettings(float customDefault)
- {
- decimals = 0;
- decimalChar = ".";
- hideZeros = false;
- dotSeparation = false;
- dotDistance = 3;
- dotChar = ".";
- suffixShorten = false;
- suffixes = new List<string>() { "K", "M", "B", "T" };
- suffixDigits = new List<int>() { 3, 3, 3, 3 };
- maxDigits = 3;
- suffixDecimals = 1;
- suffixDecimalChar = ".";
- suffixHideZeros = false;
- }
- [Header("Decimals:")]
- [Range(0,3)]
- [Tooltip("Amount of digits visible after the dot.")]
- public int decimals;
- [Tooltip("The character used for the dot.")]
- public string decimalChar;
- [Tooltip("If true zeros at the end of the number will be hidden.")]
- public bool hideZeros;
- [Header("Dots:")]
- [Tooltip("Separates the number with dots.")]
- public bool dotSeparation;
- [Tooltip("Amount of digits between each dot.")]
- public int dotDistance;
- [Tooltip("The character used for the dot.")]
- public string dotChar;
- [Header("Suffix Shorten:")]
- [Tooltip("Shortens a number like 10000 to 10K.")]
- public bool suffixShorten;
- [Tooltip("List of suffixes.")]
- public List<string> suffixes;
- [Tooltip("Corresponding list of how many digits a suffix shortens. Keep both lists at the same size.")]
- public List<int> suffixDigits;
- [Tooltip("Maximum of visible digits. If number has more digits than this it will be shortened.")]
- public int maxDigits;
- [Tooltip("Amount of decimals shown after shortening the number.")]
- [Range(0, 3)]
- public int suffixDecimals;
- [Tooltip("The character used for the dot.")]
- public string suffixDecimalChar;
- [Tooltip("If true decimal zeros will be hidden.")]
- public bool suffixHideZeros;
- }
- }
|