I just want to show my score on my WinScreen when I'm done the game. I used Unity forums but I still can't get it to work and plus I'm horrible at coding.
I'd definitely learn more about programming in general. I've not worked with Unity at all, but most of that repetitive
if( object.name == "[name]" )
{
destroy
add points
update score
}
stuff just isn't necessary. Refactor; this is code you should only have to write once, using an array of name-score pairs if you can't put that in the objects you're destroying.
Keep going and pick up some general programming knowledge (read tutorials, do NOT copy/paste blindly, understand EXACTLY what it is doing, know the syntax) and this kind of thing will be easy; the difficult bit is working out the best way to do it, not how to do it at all!
It's like how 3D artists say to collect some general art knowledge/do life drawing. You'll save loads of time and effort learning general programming and applying it to games.
Replies
if( object.name == "[name]" )
{
destroy
add points
update score
}
stuff just isn't necessary. Refactor; this is code you should only have to write once, using an array of name-score pairs if you can't put that in the objects you're destroying.
Keep going and pick up some general programming knowledge (read tutorials, do NOT copy/paste blindly, understand EXACTLY what it is doing, know the syntax) and this kind of thing will be easy; the difficult bit is working out the best way to do it, not how to do it at all!
It's like how 3D artists say to collect some general art knowledge/do life drawing. You'll save loads of time and effort learning general programming and applying it to games.