Exemple #1
0
    void OnTriggerEnter(Collider other)
    {
        switch (other.gameObject.tag)
        {
        case "Player2DBullet":
            bossData.BossDamage("NormalBullet", "2D");
            break;

        case "SpecialArts":
            bossData.BossDamage("SpecialArts", "2D");
            break;
        }
    }
Exemple #2
0
 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;
     }
 }