Behavior Refactoring
Behaviors and PerformanceStats are no longer associated solely with Ships, instead there's a generic Entity class which will also be used for stations and turrets.
This commit is contained in:
parent
fd92c80876
commit
7cd24147ae
41 changed files with 544 additions and 341 deletions
34
Assets/Scripts/ServerShared/Behaviors/Weapon.cs
Normal file
34
Assets/Scripts/ServerShared/Behaviors/Weapon.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using MessagePack;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
[Union(0, typeof(CannonData)),
|
||||
Union(1, typeof(LauncherData))]
|
||||
public abstract class WeaponData
|
||||
{
|
||||
[InspectableField, JsonProperty("damageType"), Key(0)]
|
||||
public DamageType DamageType;
|
||||
|
||||
[InspectableField, JsonProperty("damage"), Key(1)]
|
||||
public PerformanceStat Damage = new PerformanceStat();
|
||||
|
||||
[InspectableField, JsonProperty("range"), Key(2)]
|
||||
public PerformanceStat Range = new PerformanceStat();
|
||||
|
||||
[InspectableField, JsonProperty("cooldown"), Key(3)]
|
||||
public PerformanceStat Cooldown = new PerformanceStat();
|
||||
|
||||
[InspectableField, JsonProperty("heat"), Key(4)]
|
||||
public PerformanceStat Heat = new PerformanceStat();
|
||||
|
||||
[InspectableField, JsonProperty("visibility"), Key(5)]
|
||||
public PerformanceStat Visibility = new PerformanceStat();
|
||||
|
||||
[InspectableField, JsonProperty("visibilityDecay"), Key(6)]
|
||||
public PerformanceStat VisibilityDecay = new PerformanceStat();
|
||||
|
||||
[InspectableField, JsonProperty("burstCount"), Key(7)]
|
||||
public int BurstCount;
|
||||
|
||||
[InspectableField, JsonProperty("burstTime"), Key(8)]
|
||||
public PerformanceStat BurstTime = new PerformanceStat();
|
||||
}
|
||||
Loading…
Reference in a new issue