47 lines
892 B
C#
47 lines
892 B
C#
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();
|
|
}
|
|
}
|