Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     rd2D     = GetComponent <Rigidbody2D>();
     renderer = GetComponent <SpriteRenderer>();
     hpber    = GameObject.FindGameObjectWithTag("Hpber");
     hp       = hpber.GetComponent <HpBer>();
     ScoreUI  = GameObject.FindGameObjectWithTag("Score");
     ST       = ScoreUI.GetComponent <ScoreText>();
     animT    = GetComponent <Animator>();
     col2D    = GetComponent <Collider2D>();
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     hpber = GameObject.FindGameObjectWithTag("Hpber");
     hp    = hpber.GetComponent <HpBer>();
 }