void OnTriggerEnter(Collider other) { switch (other.gameObject.tag) { case "Player2DBullet": bossData.BossDamage("NormalBullet", "2D"); break; case "SpecialArts": bossData.BossDamage("SpecialArts", "2D"); break; } }
void ShotBullet() { if (CheckHitRayWithTag(ray, "Enemy", 1.0f)) { hitSound = true; enemyDataNew = raycastHit.collider.gameObject.GetComponentInParent <EnemyDataNew>(); enemyDataNew.EnemyDamage("NormalBullet"); } else if (CheckHitRayWithTag(ray, "Boss", 1.0f)) { hitSound = true; bossData = raycastHit.collider.gameObject.GetComponentInParent <BossData>(); bossData.BossDamage("NormalBullet", "3D"); } else { hitSound = false; } }
void ShotBullet() { if (CheckHitRayWithTag(ray, "Enemy", 1.0f)) { hitSound = true; enemyDataNew = raycastHit.collider.gameObject.GetComponentInParent<EnemyDataNew>(); enemyDataNew.EnemyDamage("NormalBullet"); } else if (CheckHitRayWithTag(ray, "Boss", 1.0f)) { hitSound = true; bossData = raycastHit.collider.gameObject.GetComponentInParent<BossData>(); bossData.BossDamage("NormalBullet","3D"); } else { hitSound = false; } }