31 lines
593 B
C#
Raw Normal View History

2021-11-14 00:57:45 -08:00
using QSB.WorldSync;
2021-11-10 21:13:49 -08:00
namespace QSB.MeteorSync.WorldObjects
{
public class QSBMeteorLauncher : WorldObject<MeteorLauncher>
{
2021-11-12 22:34:28 -08:00
public int MeteorId;
2021-11-11 02:08:03 -08:00
public float LaunchSpeed;
public void PreLaunchMeteor()
2021-11-10 21:13:49 -08:00
{
2021-11-11 02:08:03 -08:00
foreach (var particleSystem in AttachedObject._launchParticles)
2021-11-10 21:13:49 -08:00
{
2021-11-11 02:08:03 -08:00
particleSystem.Play();
2021-11-10 21:13:49 -08:00
}
2021-11-11 02:08:03 -08:00
}
2021-11-13 20:41:46 -08:00
public void LaunchMeteor(int meteorId, float launchSpeed)
2021-11-11 02:08:03 -08:00
{
2021-11-12 22:34:28 -08:00
MeteorId = meteorId;
2021-11-11 02:08:03 -08:00
LaunchSpeed = launchSpeed;
AttachedObject.LaunchMeteor();
foreach (var particleSystem in AttachedObject._launchParticles)
{
particleSystem.Stop();
2021-11-10 21:13:49 -08:00
}
}
}
}