Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Help in Time.DeltaTime T_T

Discussion in 'Scripting' started by NewBie01, Feb 26, 2015.

  1. NewBie01

    NewBie01

    Joined:
    Feb 22, 2015
    Posts:
    7
    where do i put the time.deltaTime to slow down the transitions of my game? pls help me :(( or do i have to make another function for it? :(


    if(validMovementBool)
    {
    _boardPieces[(int)_coordToMove.x, (int)_coordToMove.y] = _boardPieces[(int)_coordPiece.x, (int)_coordPiece.y];
    _boardPieces[(int)_coordPiece.x , (int)_coordPiece.y ] = 0;

    SelectedPiece.transform.position = new Vector3(_coordToMove.x, _pieceHeight, _coordToMove.y);

    Debug.Log(Time.deltaTime);
    SelectedPiece.renderer.material.color = Color.white; // Change it's color back
    SelectedPiece = null; // Unselect the Piece
    ChangeState (0);
    activePlayer = -activePlayer;

    }
     
  2. Strategos

    Strategos

    Joined:
    Aug 24, 2012
    Posts:
    255
  3. NewBie01

    NewBie01

    Joined:
    Feb 22, 2015
    Posts:
    7
    can you help me out with the code sir? T_T
     
  4. Juice-Tin

    Juice-Tin

    Joined:
    Jul 22, 2012
    Posts:
    250
    There's really no where to put it in that code. You must be a bit more descriptive than that.