mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-16 16:15:24 +00:00
34 lines
614 B
C#
34 lines
614 B
C#
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)
|
|
{
|
|
foreach (var particleSystem in AttachedObject._launchParticles)
|
|
{
|
|
particleSystem.Play();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
AttachedObject.LaunchMeteor();
|
|
foreach (var particleSystem in AttachedObject._launchParticles)
|
|
{
|
|
particleSystem.Stop();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|