Action Bar (WIP)
Refactor item instance to use DatabaseLink Labels now pop up when aiming at loot Yeeted HUD trigger group UI into the abyss Created rebindable action bar (missing: assigning actions) Created Consumable Items Refactored behaviors to work on consumable items Implemented Velocity Conversion Behavior
This commit is contained in:
parent
282035dd25
commit
4489b18452
217 changed files with 5105 additions and 5703 deletions
|
|
@ -10,31 +10,35 @@ using static Unity.Mathematics.math;
|
|||
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||
public class VelocityConversionData : BehaviorData
|
||||
{
|
||||
[Inspectable, JsonProperty("traction"), Key(1), RuntimeInspectable]
|
||||
public PerformanceStat Traction = new PerformanceStat();
|
||||
[Inspectable, JsonProperty("lambda"), Key(1), RuntimeInspectable]
|
||||
public PerformanceStat Lambda = new PerformanceStat();
|
||||
|
||||
public override IBehavior CreateInstance(EquippedItem item)
|
||||
public override Behavior CreateInstance(EquippedItem item)
|
||||
{
|
||||
return new VelocityConversion(this, item);
|
||||
}
|
||||
public override Behavior CreateInstance(ConsumableItemEffect item)
|
||||
{
|
||||
return new VelocityConversion(this, item);
|
||||
}
|
||||
}
|
||||
|
||||
public class VelocityConversion : IBehavior
|
||||
public class VelocityConversion : Behavior
|
||||
{
|
||||
public EquippedItem Item { get; }
|
||||
|
||||
public BehaviorData Data => _data;
|
||||
|
||||
private VelocityConversionData _data;
|
||||
|
||||
public VelocityConversion(VelocityConversionData data, EquippedItem item)
|
||||
public VelocityConversion(VelocityConversionData data, EquippedItem item) : base(data, item)
|
||||
{
|
||||
_data = data;
|
||||
}
|
||||
public VelocityConversion(VelocityConversionData data, ConsumableItemEffect item) : base(data, item)
|
||||
{
|
||||
_data = data;
|
||||
Item = item;
|
||||
}
|
||||
|
||||
public bool Execute(float dt)
|
||||
public override bool Execute(float dt)
|
||||
{
|
||||
Entity.Velocity = AetheriaMath.Damp(Entity.Velocity, Entity.Direction * length(Entity.Velocity), Evaluate(_data.Lambda), dt);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue