// Use this for initialization
 private void Start()
 {
     launchRock        = GameObject.Find("Rock").GetComponent <LaunchRock>();
     rockMovement      = GameObject.Find("Rock").GetComponent <RockMovement>();
     player            = GameObject.Find("Player");
     distanceTravelled = GameObject.Find("DistanceTravelled").GetComponent <Text>();
     centerTitleText   = GameObject.Find("TitleText").GetComponent <Text>();
     centerHeaderText  = GameObject.Find("HeaderText").GetComponent <Text>();
     hiScoreText       = GameObject.Find("HiScoreText").GetComponent <Text>();
     Reset();
 }
Exemple #2
0
 // Use this for initialization
 private void Start()
 {
     rock       = GameObject.Find("Rock");
     launchRock = rock.GetComponent <LaunchRock>();
     startPos   = transform.position;
 }