Behavior Canceling & Grouping

Behaviors are now grouped, behaviors within a group can cancel execution of the rest of the group
This commit is contained in:
hyperion51 2020-05-11 01:17:10 +01:00
commit fc94531566
35 changed files with 613 additions and 190 deletions

View file

@ -6,10 +6,10 @@ using static Unity.Mathematics.math;
[MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class ShieldData : BehaviorData
{
[InspectableField, JsonProperty("efficiency"), Key(0)]
[InspectableField, JsonProperty("efficiency"), Key(1)]
public PerformanceStat Efficiency = new PerformanceStat();
[InspectableField, JsonProperty("shielding"), Key(1)]
[InspectableField, JsonProperty("shielding"), Key(2)]
public PerformanceStat Shielding = new PerformanceStat();
public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item)
@ -42,7 +42,12 @@ public class Shield : IBehavior
{
}
public void Update(float delta)
public bool Update(float delta)
{
return true;
}
public void Remove()
{
}
}