public void MechShoot() { if (counter > delay && myHealth.currentHealth > 0 && !GameMasterObject.isFinalLevel) { anim.SetTrigger("Shoot"); Instantiate(bullet, bulletSpawnR.position, bulletSpawnR.rotation); Instantiate(bullet, bulletSpawnL.position, bulletSpawnL.rotation); EnemyBulletDamage bulletScript = bullet.GetComponent <EnemyBulletDamage>(); RocketDamage.attackBoost = enemyAttackBooster; sound.PlayOneShot(blast); counter = 0; } if (counter > delay && myHealth.currentHealth > 0 && GameMasterObject.isFinalLevel) { anim.SetTrigger("Shoot"); Instantiate(allyBullet, bulletSpawnR.position, bulletSpawnR.rotation); Instantiate(allyBullet, bulletSpawnL.position, bulletSpawnL.rotation); EnemyBulletDamage bulletScript = bullet.GetComponent <EnemyBulletDamage>(); RocketDamage.attackBoost = enemyAttackBooster; sound.PlayOneShot(blast); counter = 0; } }
public void MechShoot() { if (counter > delay && myHealth.currentHealth > 0) { anim.SetTrigger("Shoot"); Instantiate(bullet, bulletSpawnR.position, bulletSpawnR.rotation); Instantiate(bullet, bulletSpawnL.position, bulletSpawnL.rotation); EnemyBulletDamage bulletScript = bullet.GetComponent <EnemyBulletDamage>(); bulletScript.enemyAttackBoost = enemyAttackBooster; sound.PlayOneShot(blast); counter = 0; } }