mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-29 09:32:38 +00:00
39 lines
735 B
C#
39 lines
735 B
C#
using QSB.Utility;
|
|
using QSB.WorldSync;
|
|
|
|
namespace QSB.MeteorSync.WorldObjects
|
|
{
|
|
public class QSBMeteorLauncher : WorldObject<MeteorLauncher>
|
|
{
|
|
public override void Init(MeteorLauncher attachedObject, int id)
|
|
{
|
|
ObjectId = id;
|
|
AttachedObject = attachedObject;
|
|
}
|
|
|
|
|
|
public void LaunchMeteor(bool preLaunch)
|
|
{
|
|
if (preLaunch)
|
|
{
|
|
DebugLog.DebugWrite($"{LogName} - pre launch");
|
|
|
|
foreach (var particleSystem in AttachedObject._launchParticles)
|
|
{
|
|
particleSystem.Play();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
DebugLog.DebugWrite($"{LogName} - launch");
|
|
|
|
AttachedObject.LaunchMeteor();
|
|
foreach (var particleSystem in AttachedObject._launchParticles)
|
|
{
|
|
particleSystem.Stop();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|