Hit Detection

This commit is contained in:
Reinier Vens 2021-01-08 12:44:10 +00:00
commit 871c978301
225 changed files with 210834 additions and 237 deletions

View file

@ -18,9 +18,6 @@ public class ConstantWeaponData : WeaponData
public class ConstantWeapon : IBehavior, IAlwaysUpdatedBehavior
{
private ConstantWeaponData _data;
public int _burstCount;
public float _burstTimer;
private Entity Entity { get; }
private EquippedItem Item { get; }

View file

@ -9,31 +9,31 @@ using Unity.Mathematics;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class LauncherData : InstantWeaponData
{
[InspectableAnimationCurve, JsonProperty("guidance"), Key(7)]
[InspectableAnimationCurve, JsonProperty("guidance"), Key(9)]
public float4[] GuidanceCurve;
[InspectableAnimationCurve, JsonProperty("thrustCurve"), Key(8)]
[InspectableAnimationCurve, JsonProperty("thrustCurve"), Key(10)]
public float4[] ThrustCurve;
[InspectableAnimationCurve, JsonProperty("liftCurve"), Key(9)]
[InspectableAnimationCurve, JsonProperty("liftCurve"), Key(11)]
public float4[] LiftCurve;
[InspectableField, JsonProperty("thrust"), Key(10)]
[InspectableField, JsonProperty("thrust"), Key(12)]
public PerformanceStat Thrust = new PerformanceStat();
[InspectableField, JsonProperty("lockAngle"), Key(11)]
[InspectableField, JsonProperty("lockAngle"), Key(13)]
public float LockAngle;
[InspectableField, JsonProperty("frequency"), Key(12)]
[InspectableField, JsonProperty("frequency"), Key(14)]
public float DodgeFrequency;
[InspectableField, JsonProperty("launchSpeed"), Key(13)]
[InspectableField, JsonProperty("launchSpeed"), Key(15)]
public PerformanceStat LaunchSpeed = new PerformanceStat();
[InspectableField, JsonProperty("missileSpeed"), Key(14)]
[InspectableField, JsonProperty("missileSpeed"), Key(16)]
public PerformanceStat MissileSpeed = new PerformanceStat();
[InspectableField, JsonProperty("lockOnTime"), Key(15)]
[InspectableField, JsonProperty("lockOnTime"), Key(17)]
public PerformanceStat LockOnTime = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -9,13 +9,13 @@ using Newtonsoft.Json;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class ProjectileWeaponData : InstantWeaponData
{
[InspectableField, JsonProperty("spread"), Key(7)]
[InspectableField, JsonProperty("spread"), Key(9)]
public PerformanceStat Spread = new PerformanceStat();
[InspectableField, JsonProperty("bulletInherit"), Key(8)]
[InspectableField, JsonProperty("bulletInherit"), Key(10)]
public float Inherit;
[InspectableField, JsonProperty("bulletVelocity"), Key(9)]
[InspectableField, JsonProperty("bulletVelocity"), Key(11)]
public PerformanceStat Velocity = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -17,20 +17,26 @@ public abstract class WeaponData : BehaviorData
[InspectableField, JsonProperty("damage"), Key(2)]
public PerformanceStat Damage = new PerformanceStat();
[InspectableField, JsonProperty("range"), Key(3)]
[RangedFloatInspectable(0,1), JsonProperty("penetration"), Key(3)]
public PerformanceStat Penetration = new PerformanceStat();
[RangedFloatInspectable(0,1), JsonProperty("damageSpread"), Key(4)]
public PerformanceStat DamageSpread = new PerformanceStat();
[InspectableField, JsonProperty("range"), Key(5)]
public PerformanceStat Range = new PerformanceStat();
[InspectablePrefab, JsonProperty("effect"), Key(4)]
[InspectablePrefab, JsonProperty("effect"), Key(6)]
public string EffectPrefab;
}
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public abstract class InstantWeaponData : WeaponData
{
[InspectableField, JsonProperty("burstCount"), Key(5)]
[InspectableField, JsonProperty("burstCount"), Key(7)]
public int BurstCount;
[InspectableField, JsonProperty("burstTime"), Key(6)]
[InspectableField, JsonProperty("burstTime"), Key(8)]
public PerformanceStat BurstTime = new PerformanceStat();
}