// Use this for initialization void Start() { big = GameObject.Find("BigBudy").GetComponent <BigBudy>(); anim = gameObject.GetComponent <Animator>(); anim.Play("walk_body"); }
private void OnTriggerEnter2D(Collider2D col) { //enemigo toca al player if (col.gameObject.tag == "Enemy") { buddy = col.gameObject.GetComponent <BigBudy>(); if (!buddy.ent) { buddy.ent = true; isSad = true; } } if (col.gameObject.tag == "EnemyBullet") { isSad = true; } }
// Use this for initialization void Start() { big = GameObject.Find("BigBudy").GetComponent <BigBudy>(); r = gameObject.GetComponent <SpriteRenderer>(); }