Universally challenged fixed
This commit is contained in:
46
Assets/Quiz/Scripts/UC/TurretController.cs
Normal file
46
Assets/Quiz/Scripts/UC/TurretController.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
|
||||
public class TurretController : UdonSharpBehaviour
|
||||
{
|
||||
public AudioSource audioSource;
|
||||
public AudioClip gunLower1;
|
||||
public AudioClip gunLower2;
|
||||
public AudioClip GunSpinUp;
|
||||
public AudioClip steamBlast;
|
||||
|
||||
public ParticleSystem steamParticleSystem;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
steamParticleSystem.Stop();
|
||||
}
|
||||
|
||||
public void PlayGunLower1()
|
||||
{
|
||||
audioSource.PlayOneShot(gunLower1);
|
||||
}
|
||||
|
||||
public void PlayGunLower2()
|
||||
{
|
||||
audioSource.PlayOneShot(gunLower2);
|
||||
}
|
||||
|
||||
public void PlayGunSpinUp()
|
||||
{
|
||||
audioSource.PlayOneShot(GunSpinUp);
|
||||
}
|
||||
|
||||
public void PlaySteamBlast()
|
||||
{
|
||||
audioSource.PlayOneShot(steamBlast);
|
||||
steamParticleSystem.Play();
|
||||
}
|
||||
|
||||
public void StopSteamBlast()
|
||||
{
|
||||
steamParticleSystem.Stop();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user