Home Technical Talk

UNITY3d: Show Score When finished the game

manilamerc
polycounter lvl 6
Offline / Send Message
manilamerc polycounter lvl 6
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.

Here is what I know so far from the Unity Forums

http://forum.unity3d.com/threads/160682-Show-Score-When-finished-the-game

Replies

  • JamesWild
    Offline / Send Message
    JamesWild polycounter lvl 8
    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.
Sign In or Register to comment.