- Home /
Other
counting score after destroying game object
Hi. I just can't get it working. I tried to see other solutions but I can'T see what I did wrong.
I have a simple game where you just avoid obstacles. Those obstacles travel towards the player (cube). Behind the player I have wall that on collision testroyes obstacle.
I added 3d text and I just don't know how to set it to count score.
void OnCollisionEnter(Collision col)
{
if (col.gameObject.name == "Obstacle(Clone)")
{
Destroy(col.gameObject);
}
}
Answer by Diukrone · Jan 20, 2018 at 06:28 PM
Have many ways. Try a basic tutorial to get the skill to read a code.
Alright, I found out it is setting the text of my wall. But I want to set it to some other 3d text, still no idea how to do it.
Follow this Question
Related Questions
Moving cube on x by 1 1 Answer
i Have AN error when i create assets font editor 0 Answers
Need help in typing project 0 Answers
How can i change this c# script from 3D to 2D ? 0 Answers
Multiple Cars not working 1 Answer