using System.Collections;
using UnityEngine;
public class CurrencyConverter : MonoBehaviour {
private static CurrencyConverter instance;
public static CurrencyConverter {
get {
return instance;
}
}
void Awake(){
CreateInstance ();
}
void CreateInstance(){
if (instance == null) {
instance = this;
}
}
public string GettCurencyIntoString(float valueToConvert, bool currencyPerSec, bool currencyPerClick){
string converted;
if (valueToConvert >= 1000000) {
converted = (valueToConvert / 1000000f).ToString ("f3") + " Mil";
} else if (valueToConvert >= 1000) {
converted = (valueToConvert / 1000f).ToString ("f3") + " Tys";
} else {
converted = "" + valueToConvert;
}
if (currencyPerSec == true) {
converted = converted + " ZNS";
}
if (currencyPerClick == true) {
converted = converted + " ZNS";
}
}
}
Error: The namespace "global::" already contains a definition for "CurrencyConverter"