Search Unity

Could someone help me with this simple script?

Discussion in 'Scripting' started by Bondyfan, Oct 22, 2014.

  1. Bondyfan

    Bondyfan

    Joined:
    Oct 21, 2014
    Posts:
    15
    Hello.
    I want this script to show score (Time.time). But i want to activate it 10 second after scene starts. Im a beginner at programming. Thank you :)
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.UI;
    3. using System.Collections;
    4. public class scoretext : MonoBehaviour
    5. {
    6.     Text text;                      // Reference to the Text component.
    7.     void Awake ()
    8.     {
    9.         // Set up the reference.
    10.         text = GetComponent <Text> ();
    11.     }
    12.     void Update ()
    13.         {
    14.         text.text = "Score : " +(int) Time.time;
    15.         }
    16. }    
     
  2. cmcpasserby

    cmcpasserby

    Joined:
    Jul 18, 2014
    Posts:
    315
    JoeStrout likes this.