Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

my problem in (TIme.deltatime)

Discussion in 'Scripting' started by HaaasKN, Jan 14, 2015.

  1. HaaasKN

    HaaasKN

    Joined:
    Jan 14, 2015
    Posts:
    4
    I have a problem at the Time.deltatime
    Code

    Code (JavaScript):
    1. #pragma strict
    2. var hor : int = 0 ;
    3. var min : float = 0;
    4. var day : int = 0 ;
    5.  
    6. function Start () {
    7.  
    8. }
    9.  
    10. function Update () {
    11. min = min + 1 * Time.deltatime ;
    12. if (min >= 60)
    13. {
    14. min = 0;
    15. hor ++ ;
    16. }
    17. if (hor >= 24)
    18. {
    19. hor = 0 ;
    20. day ++ ;
    21. }
    22.  
    23.  
    24. }



    I need a solution o_O

    Unity 3d Tell me 'deltatime' is not a member of 'Time' . :(

    The problem in
    Code (JavaScript):
    1. min = min + 1 * Time.deltatime ;
     
    Last edited: Jan 14, 2015
  2. Dameon_

    Dameon_

    Joined:
    Apr 11, 2014
    Posts:
    542
    Capitalize that T in deltaTime.
     
  3. HaaasKN

    HaaasKN

    Joined:
    Jan 14, 2015
    Posts:
    4
    How
     
    chelnok likes this.
  4. chelnok

    chelnok

    Joined:
    Jul 2, 2012
    Posts:
    680
    Keep shift button down while pressing t button. You can also use capslock :p
     
    cmcpasserby likes this.
  5. HaaasKN

    HaaasKN

    Joined:
    Jan 14, 2015
    Posts:
    4
    ^_^
    i know

    I did what she told me it but the problem persists :confused:
     
  6. HaaasKN

    HaaasKN

    Joined:
    Jan 14, 2015
    Posts:
    4
    Give back to me with writing code debugging .
     
  7. dterbeest

    dterbeest

    Joined:
    Mar 23, 2012
    Posts:
    389
    Code (csharp):
    1.  
    2. min += Time.deltaTime;
    3.  
    JaVaScriPt iS cAseSenSitIVe :p