void OnTriggerEnter2D(Collider2D target) { if (target.gameObject.tag == targetTag) { health.Damaged(40); } }
void OnTriggerEnter2D(Collider2D target) { if (target.gameObject.tag == targetTag) { health.Damaged(collidingDamage); } if (target.gameObject.tag == "Attack") { bigGhostRenderer.color = new Color(255f, 0f, 0f, 255f); } }
void OnTriggerEnter2D(Collider2D target) { if (target.isTrigger != true) { if (target.gameObject.tag == "Player") { health.Damaged(power); } Destroy(gameObject); } }
void OnTriggerEnter2D(Collider2D target) { if (target.gameObject.tag == targetTag) { health.Damaged(collidingDamage); } if (target.gameObject.tag == "Attack") { devilRenderer.color = new Color(255f, 0f, 0f, 255f); } if (target.gameObject.tag == "Wall") { devilRenderer.flipX = !devilRenderer.flipX; direction *= -1; } }