2022-02-14 23:25:43 +00:00
|
|
|
|
using QSB.WorldSync;
|
2021-11-11 05:13:49 +00:00
|
|
|
|
|
2022-02-25 06:04:54 +00:00
|
|
|
|
namespace QSB.MeteorSync.WorldObjects;
|
|
|
|
|
|
|
|
|
|
public class QSBMeteorLauncher : WorldObject<MeteorLauncher>
|
2021-11-11 05:13:49 +00:00
|
|
|
|
{
|
2022-02-25 06:04:54 +00:00
|
|
|
|
public override void SendInitialState(uint to)
|
2021-11-11 05:13:49 +00:00
|
|
|
|
{
|
2022-02-25 06:04:54 +00:00
|
|
|
|
// todo SendInitialState
|
|
|
|
|
}
|
2022-01-26 05:08:04 +00:00
|
|
|
|
|
2022-02-25 06:04:54 +00:00
|
|
|
|
public int MeteorId;
|
|
|
|
|
public float LaunchSpeed;
|
2022-02-14 23:25:43 +00:00
|
|
|
|
|
2022-02-25 06:04:54 +00:00
|
|
|
|
public void PreLaunchMeteor()
|
|
|
|
|
{
|
|
|
|
|
foreach (var particleSystem in AttachedObject._launchParticles)
|
2021-11-11 05:13:49 +00:00
|
|
|
|
{
|
2022-02-25 06:04:54 +00:00
|
|
|
|
particleSystem.Play();
|
2021-11-11 10:08:03 +00:00
|
|
|
|
}
|
2022-02-25 06:04:54 +00:00
|
|
|
|
}
|
2021-11-11 10:08:03 +00:00
|
|
|
|
|
2022-02-25 06:04:54 +00:00
|
|
|
|
public void LaunchMeteor(int meteorId, float launchSpeed)
|
|
|
|
|
{
|
|
|
|
|
MeteorId = meteorId;
|
|
|
|
|
LaunchSpeed = launchSpeed;
|
2021-11-11 10:08:03 +00:00
|
|
|
|
|
2022-02-25 06:04:54 +00:00
|
|
|
|
AttachedObject.LaunchMeteor();
|
|
|
|
|
foreach (var particleSystem in AttachedObject._launchParticles)
|
|
|
|
|
{
|
|
|
|
|
particleSystem.Stop();
|
2021-11-11 05:13:49 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2022-02-25 06:04:54 +00:00
|
|
|
|
}
|