SFX added
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user