public void Soft(float From, float To, Text UI_Text, bool useComma) { if (From == To) { return; } SoftnerClass temp = new SoftnerClass(); temp.UI = UI_Text; temp.ToCount = To; temp.FromCount = From; temp.CurrentNumber = From; temp.useComma = useComma; temp.useSound = true; temp.Timer = 1.0f; temp.Speed = 8.0f; Nums.Add(temp); if (AS.clip != null) { if (!AS.isPlaying) { AS.Play(); } } }
public void Soft(float To, Text UI_Text) { int From; System.Int32.TryParse(UI_Text.text, out From); if (From == To) { return; } SoftnerClass temp = new SoftnerClass(); temp.UI = UI_Text; temp.ToCount = To; temp.FromCount = From; temp.CurrentNumber = From; temp.useComma = false; temp.useSound = true; temp.Timer = 1.0f; temp.Speed = 8.0f; Nums.Add(temp); if (AS.clip != null) { if (!AS.isPlaying) { AS.Play(); } } }