Віконце з монетами 3D
Coin
public UnityEngine.UI.Text t1;
public static int a = 0;
bool was = false;
void OnTriggerEnter(Collider other)
{
if (was == false)
{
a++;
was = true;
t1.text = "Монет: " + a;
Destroy(gameObject);
}
}
[ Монети без UI ]
Coin
public UnityEngine.UI.Text t1;
public static int a = 0;
bool was = false;
void OnTriggerEnter(Collider other)
{
if (was == false)
{
a++;
was = true;
t1.text = "Монет: " + a;
Destroy(gameObject);
}
}
[ Монети без UI ]