quantum-space-buddies/QSB/Tools/ProbeLauncherTool/QSBProbeLauncherTool.cs

41 lines
899 B
C#
Raw Normal View History

2021-12-24 01:07:29 +00:00
using UnityEngine;
2021-07-26 21:55:09 +00:00
namespace QSB.Tools.ProbeLauncherTool
{
public class QSBProbeLauncherTool : QSBTool
{
public GameObject PreLaunchProbeProxy;
public ProbeLauncherEffects Effects;
public SingularityWarpEffect ProbeRetrievalEffect;
public void RetrieveProbe(bool playEffects)
{
2021-12-15 21:09:10 +00:00
if (Effects._owAudioSource == null)
{
Effects._owAudioSource = Player.AudioController._repairToolSource;
}
2021-07-26 21:55:09 +00:00
PreLaunchProbeProxy.SetActive(true);
if (playEffects)
{
Effects.PlayRetrievalClip();
ProbeRetrievalEffect.WarpObjectIn(0.3f);
}
}
public void LaunchProbe()
{
PreLaunchProbeProxy.SetActive(false);
2021-12-15 21:09:10 +00:00
if (Effects._owAudioSource == null)
{
Effects._owAudioSource = Player.AudioController._repairToolSource;
}
2021-07-26 21:55:09 +00:00
// TODO : make this do underwater stuff correctly
Effects.PlayLaunchClip(false);
Effects.PlayLaunchParticles(false);
}
}
}