Bypass configs for simple behaviors
This commit is contained in:
parent
068bc11622
commit
b97bf31b50
14 changed files with 152 additions and 256 deletions
|
|
@ -4,32 +4,20 @@
|
|||
|
||||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
public class VelocityConversionConfig : RuntimeBehaviorConfig
|
||||
{
|
||||
[Inspectable]
|
||||
public PerformanceStat Lambda = new PerformanceStat();
|
||||
|
||||
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 : Behavior
|
||||
{
|
||||
private readonly PerformanceStat _lambda;
|
||||
|
||||
public VelocityConversion(VelocityConversionConfig data, EquippedItem item) : base(data, item)
|
||||
public VelocityConversion(RuntimeBehaviorDefinition definition, EquippedItem item) : base(definition, item)
|
||||
{
|
||||
_lambda = data.Lambda;
|
||||
_lambda = definition.PerformanceStat(1, new PerformanceStat());
|
||||
RegisterPerformanceStat("Lambda", _lambda);
|
||||
}
|
||||
public VelocityConversion(VelocityConversionConfig data, ConsumableItemEffect item) : base(data, item)
|
||||
|
||||
public VelocityConversion(RuntimeBehaviorDefinition definition, ConsumableItemEffect item) : base(definition, item)
|
||||
{
|
||||
_lambda = data.Lambda;
|
||||
_lambda = definition.PerformanceStat(1, new PerformanceStat());
|
||||
RegisterPerformanceStat("Lambda", _lambda);
|
||||
}
|
||||
|
||||
public override bool Execute(float dt)
|
||||
|
|
|
|||
Loading…
Reference in a new issue