using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; using System; public class Budget : MonoBehaviour { public Text Price; public Text CurrencyTexte; public TMP_Dropdown Currency; public void PlusOrMinus() { print(Price.text); string currensy="$"; if(Currency.value==1)currensy="€"; string Ps=Price.text.Replace(" ","").Replace("$","").Replace("€",""); float P=float.Parse(Ps); if(name=="Plus")P+=1000; if(name=="Minus")P-=1000; if(P<1000)P=1000; Ps=P.ToString(); Ps=currensy+" "+Ps.Substring(0,Ps.Length-3)+" 000"; Price.text=Ps; } public void CurrencySet() { if(Currency.value==0)Price.text=Price.text.Replace("€","$"); if(Currency.value==1)Price.text=Price.text.Replace("$","€"); } }