quantum-space-buddies/QSB/Tools/ProbeLauncherTool/QSBProbeLauncherTool.cs
Mister_Nebula 430e61a401 cleanup
2021-12-15 21:11:30 +00:00

42 lines
918 B
C#

using QSB.Utility;
using UnityEngine;
namespace QSB.Tools.ProbeLauncherTool
{
public class QSBProbeLauncherTool : QSBTool
{
public GameObject PreLaunchProbeProxy;
public ProbeLauncherEffects Effects;
public SingularityWarpEffect ProbeRetrievalEffect;
public void RetrieveProbe(bool playEffects)
{
if (Effects._owAudioSource == null)
{
Effects._owAudioSource = Player.AudioController._repairToolSource;
}
PreLaunchProbeProxy.SetActive(true);
if (playEffects)
{
Effects.PlayRetrievalClip();
ProbeRetrievalEffect.WarpObjectIn(0.3f);
}
}
public void LaunchProbe()
{
PreLaunchProbeProxy.SetActive(false);
if (Effects._owAudioSource == null)
{
Effects._owAudioSource = Player.AudioController._repairToolSource;
}
// TODO : make this do underwater stuff correctly
Effects.PlayLaunchClip(false);
Effects.PlayLaunchParticles(false);
}
}
}