Advertisement
Guest User

VitoTranslation.cs

a guest
Mar 31st, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class VitoTranslation : MonoBehaviour {
  5.     private bool translated;
  6.     void start(){
  7.         translated = false;
  8.     }
  9.     void Update () {
  10.         ReadThisWord();
  11.     }
  12.     void ReadThisWord(){
  13.         if(translated == false)
  14.             transform.Translate(Vector3.forward * Time.deltaTime);
  15.        if (transform.position.z >= 40.0f)    //takes approx 40s to read "Read This Word"
  16.             translated = true;
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement