SFX added

This commit is contained in:
2023-08-06 16:46:05 +05:30
parent a0ebd1d3f3
commit 50a2bec854
61 changed files with 35177 additions and 34198 deletions

View File

@@ -63,6 +63,9 @@ public class PlayerController : MonoBehaviour
if(powerupTimer > 0){
powerupTimer-=Time.deltaTime;
if(powerupTimer <= 0){
OnPowerdown();
}
}
}
@@ -102,6 +105,7 @@ public class PlayerController : MonoBehaviour
public static void NearMissFX(){
instance.nearMissAnim.gameObject.SetActive(true);
instance.nearMissAnim.CrossFade("txt_intro",0.01f);
AudioManager.PlayWhoosh();
}
public float PowerupLife = 30;
public float PowerupSpeedMult = 1.3f;
@@ -109,6 +113,7 @@ public class PlayerController : MonoBehaviour
public float powerupTimer = 0;
public void ActivatePowerup(){
powerupTimer = PowerupLife;
AudioManager.PlayPowerup();
}
public static int AdCounter=0;
public async void GameOver(){
@@ -132,6 +137,10 @@ public class PlayerController : MonoBehaviour
}
}
void OnPowerdown(){
AudioManager.PlayPowerdown();
}
public void SpawnExplosionFX(Vector3 pos){
Instantiate(ExplosionFX,pos, Quaternion.identity);
AudioManager.PlayExplosion();