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

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