private void OnTriggerEnter2D(Collider2D collider) { if (collider.CompareTag("Hit")) { mc = collider.GetComponent <MoveCircle>(); mc.sicronizo = true; } }
void OnTriggerEnter2D(Collider2D otherCollider) { MoveCircle ta = otherCollider.gameObject.GetComponent <MoveCircle>(); if (ta != null) { checkPos = true; } }
void OnTriggerEnter2D(Collider2D otherCollider) { MoveRect ta = otherCollider.gameObject.GetComponent <MoveRect>(); MoveTri ta1 = otherCollider.gameObject.GetComponent <MoveTri>(); MoveCircle ta2 = otherCollider.gameObject.GetComponent <MoveCircle>(); if (ta != null || ta1 != null || ta2 != null) { theCounter1 += 1; } }
void Awake() { movimento = GetComponent <MovimentoPersonagem>(); camera = GameObject.FindWithTag("MainCamera").GetComponent <Camera>(); AudioProcessor processor = GameObject.FindWithTag("MainCamera").GetComponent <AudioProcessor> (); processor.onBeat.AddListener(onOnbeatDetected); mv = GameObject.FindWithTag("Hit").GetComponent <MoveCircle> (); mira = GameObject.FindGameObjectWithTag("mira"); mira.SetActive(false); }