/// <summary> /// Gets the name of the upgrade for displaying in the shop /// </summary> /// <returns>name + level</returns> public override string ToString() { if (maxLevel > 1 && level >= 0) { return(GetName() + " " + Roman.To(level + 1)); // Display name with level } return(GetName()); }
private string GetUniquePostFixNumber(String name) { int postfix; postfixDicionary.TryGetValue(name, out postfix); postfix++; postfixDicionary[name] = postfix; return(Roman.To(postfix)); }
private string ReplaceNumsForRomans(Match m) { if (int.TryParse(m.Value, out var intVal)) { return(Roman.To(intVal)); } else { return(m.Value); } }
public void ShowName(string _name, int _index) { MapNames mn = maps[0]; Debug.Log(_name); foreach (MapNames map in maps) { if (map.name.ToLower() == _name.ToLower()) { mn = map; } } index.color = Color.clear; index.text = Roman.To(_index); background.color = logo.color = Color.black; logo.sprite = mn.timeLogo; StartCoroutine(_Show()); }
public void Roman_1000_M() { Assert.AreEqual("M", Roman.To(1000)); }
public void Roman_900_CM() { Assert.AreEqual("CM", Roman.To(900)); }
public void Roman_500_D() { Assert.AreEqual("D", Roman.To(500)); }
public void Roman_400_CD() { Assert.AreEqual("CD", Roman.To(400)); }
public void Roman_100_C() { Assert.AreEqual("C", Roman.To(100)); }
public void Roman_2_II() { Assert.AreEqual("II", Roman.To(2)); }
public void Roman_10_X() { Assert.AreEqual("X", Roman.To(10)); }
public void Roman_1_I() { Assert.AreEqual("I", Roman.To(1)); }
public void Roman_9_IX() { Assert.AreEqual("IX", Roman.To(9)); }
public void Roman_5_V() { Assert.AreEqual("V", Roman.To(5)); }
public void Roman_4_IV() { Assert.AreEqual("IV", Roman.To(4)); }
public void Roman_3_III() { Assert.AreEqual("III", Roman.To(3)); }
public void Roman_11984_MMMMMMMMMMMCMLXXXIV() { Assert.AreEqual("MMMMMMMMMMMCMLXXXIV", Roman.To(11984)); }
private string ReplaceNumsForRomans(Match m) { return(Roman.To(int.Parse(m.Value))); }
private string GetRomanLabel(int index) => Roman.To(index + 1).ToLower();
public void Roman_49_XLIX() { Assert.AreEqual("XLIX", Roman.To(49)); }
public void Roman_50_L() { Assert.AreEqual("L", Roman.To(50)); }