// 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>(); }
// Use this for initialization void Start() { hpber = GameObject.FindGameObjectWithTag("Hpber"); hp = hpber.GetComponent <HpBer>(); }