private void CheckIn() { if (!isAnIn) { RaycastHit2D hit = Physics2D.Raycast(left.position, Vector2.up, detectionLine, 1 << LayerMask.NameToLayer("AN")); if (hit.transform != null) { isAnIn = true; an = hit.transform.GetComponent <An>(); anMass = an.GetComponent <Rigidbody2D>().mass; } } if (!isPankapuIn) { RaycastHit2D hit = Physics2D.Raycast(left.position, Vector2.up, detectionLine, 1 << LayerMask.NameToLayer("Pankapu")); if (hit.transform != null) { isPankapuIn = true; pankapu = hit.transform.GetComponent <Pankapu>(); pankapuMass = pankapu.GetComponent <Rigidbody2D>().mass; } } }
private void OnTriggerEnter2D(Collider2D collision) { Pankapu pankapu = collision.GetComponent <Pankapu>(); if (pankapu != null) { EventCenter.Braodcast(EventType.BossCamera); } }
private void OnTriggerEnter2D(Collider2D collision) { An an = collision.GetComponent <An>(); if (an != null) { an.SetCheckPoint(this); Pankapu.SetCheckPoint(this); } }