2020-12-22 03:13:43 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
2020-03-22 19:05:26 +00:00
|
|
|
|
|
|
|
|
using MessagePack;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Unity.Mathematics;
|
|
|
|
|
|
2021-03-31 04:07:11 +01:00
|
|
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
2021-01-25 05:53:36 +00:00
|
|
|
public class LauncherData : LockWeaponData
|
2020-03-22 19:05:26 +00:00
|
|
|
{
|
2021-02-11 03:14:20 +00:00
|
|
|
[InspectableAnimationCurve, JsonProperty("guidance"), Key(26)]
|
2020-03-22 19:05:26 +00:00
|
|
|
public float4[] GuidanceCurve;
|
|
|
|
|
|
2021-02-11 03:14:20 +00:00
|
|
|
[InspectableAnimationCurve, JsonProperty("thrustCurve"), Key(27)]
|
2020-03-22 19:05:26 +00:00
|
|
|
public float4[] ThrustCurve;
|
|
|
|
|
|
2021-02-11 03:14:20 +00:00
|
|
|
[InspectableAnimationCurve, JsonProperty("liftCurve"), Key(28)]
|
2020-03-22 19:05:26 +00:00
|
|
|
public float4[] LiftCurve;
|
|
|
|
|
|
2021-03-31 04:07:11 +01:00
|
|
|
[Inspectable, JsonProperty("thrust"), Key(29)]
|
2020-04-09 07:48:45 +01:00
|
|
|
public PerformanceStat Thrust = new PerformanceStat();
|
2020-03-22 19:05:26 +00:00
|
|
|
|
2021-03-31 04:07:11 +01:00
|
|
|
[Inspectable, JsonProperty("frequency"), Key(30)]
|
2020-03-22 19:05:26 +00:00
|
|
|
public float DodgeFrequency;
|
|
|
|
|
|
2021-03-31 04:07:11 +01:00
|
|
|
[Inspectable, JsonProperty("missileSpeed"), Key(31), RuntimeInspectable]
|
2021-01-31 03:52:32 +00:00
|
|
|
public PerformanceStat MissileVelocity = new PerformanceStat();
|
2020-03-22 19:05:26 +00:00
|
|
|
|
2021-04-18 05:13:20 +01:00
|
|
|
public override Behavior CreateInstance(EquippedItem item)
|
2020-03-22 19:05:26 +00:00
|
|
|
{
|
2021-04-12 04:20:52 +01:00
|
|
|
return new LockWeapon(this, item);
|
2020-03-22 19:05:26 +00:00
|
|
|
}
|
2021-02-01 08:13:14 +00:00
|
|
|
}
|
|
|
|
|
|
2021-03-31 04:07:11 +01:00
|
|
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
2021-02-01 08:13:14 +00:00
|
|
|
public class GuidedWeaponData : InstantWeaponData
|
|
|
|
|
{
|
2021-02-11 03:14:20 +00:00
|
|
|
[InspectableAnimationCurve, JsonProperty("guidance"), Key(21)]
|
2021-02-01 08:13:14 +00:00
|
|
|
public float4[] GuidanceCurve;
|
|
|
|
|
|
2021-02-11 03:14:20 +00:00
|
|
|
[InspectableAnimationCurve, JsonProperty("thrustCurve"), Key(22)]
|
2021-02-01 08:13:14 +00:00
|
|
|
public float4[] ThrustCurve;
|
|
|
|
|
|
2021-02-11 03:14:20 +00:00
|
|
|
[InspectableAnimationCurve, JsonProperty("liftCurve"), Key(23)]
|
2021-02-01 08:13:14 +00:00
|
|
|
public float4[] LiftCurve;
|
|
|
|
|
|
2021-03-31 04:07:11 +01:00
|
|
|
[Inspectable, JsonProperty("thrust"), Key(24)]
|
2021-02-01 08:13:14 +00:00
|
|
|
public PerformanceStat Thrust = new PerformanceStat();
|
|
|
|
|
|
2021-03-31 04:07:11 +01:00
|
|
|
[Inspectable, JsonProperty("frequency"), Key(25)]
|
2021-02-01 08:13:14 +00:00
|
|
|
public float DodgeFrequency;
|
|
|
|
|
|
2021-03-31 04:07:11 +01:00
|
|
|
[Inspectable, JsonProperty("missileSpeed"), Key(26), RuntimeInspectable]
|
2021-02-01 08:13:14 +00:00
|
|
|
public PerformanceStat MissileVelocity = new PerformanceStat();
|
|
|
|
|
|
2021-04-18 05:13:20 +01:00
|
|
|
public override Behavior CreateInstance(EquippedItem item)
|
2021-02-01 08:13:14 +00:00
|
|
|
{
|
2021-04-12 04:20:52 +01:00
|
|
|
return new InstantWeapon(this, item);
|
2021-02-01 08:13:14 +00:00
|
|
|
}
|
2020-03-22 19:05:26 +00:00
|
|
|
}
|