39 lines
866 B
C#
Raw Normal View History

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