mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-08 18:51:19 +00:00
36 lines
679 B
C#
36 lines
679 B
C#
using QSB.WorldSync;
|
|
|
|
namespace QSB.MeteorSync.WorldObjects
|
|
{
|
|
public class QSBMeteorLauncher : WorldObject<MeteorLauncher>
|
|
{
|
|
public override void SendInitialState(uint to)
|
|
{
|
|
// todo SendInitialState
|
|
}
|
|
|
|
public int MeteorId;
|
|
public float LaunchSpeed;
|
|
|
|
public void PreLaunchMeteor()
|
|
{
|
|
foreach (var particleSystem in AttachedObject._launchParticles)
|
|
{
|
|
particleSystem.Play();
|
|
}
|
|
}
|
|
|
|
public void LaunchMeteor(int meteorId, float launchSpeed)
|
|
{
|
|
MeteorId = meteorId;
|
|
LaunchSpeed = launchSpeed;
|
|
|
|
AttachedObject.LaunchMeteor();
|
|
foreach (var particleSystem in AttachedObject._launchParticles)
|
|
{
|
|
particleSystem.Stop();
|
|
}
|
|
}
|
|
}
|
|
}
|