mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-09 12:54:51 +00:00
42 lines
918 B
C#
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);
|
|
}
|
|
}
|
|
}
|