예제 #1
0
{ void Start()
  {
      Text myText = GetComponent <Text>();

      myText.text = ScoreKeeperScript.score.ToString();
      ScoreKeeperScript.Reset();
  }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        float   distance    = transform.position.z - Camera.main.transform.position.z;
        Vector3 meestlinks  = Camera.main.ViewportToWorldPoint(new Vector3(0, 0, distance));
        Vector3 meestrechts = Camera.main.ViewportToWorldPoint(new Vector3(1, 0, distance));

        xmin = meestlinks.x + padding;
        xmax = meestrechts.x - padding;

        Healthbar.value = health;

        _scoreKeeper = GameObject.Find("ScoreKeeper").GetComponent <ScoreKeeperScript>();
        _scoreKeeper.Reset();
    }