Bypass configs for simple behaviors
This commit is contained in:
parent
068bc11622
commit
b97bf31b50
14 changed files with 152 additions and 256 deletions
|
|
@ -5,38 +5,20 @@
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[Inspectable]
|
||||
public class ReflectorConfig : RuntimeBehaviorConfig
|
||||
{
|
||||
[Inspectable]
|
||||
public PerformanceStat CrossSection = new PerformanceStat();
|
||||
|
||||
// [InspectableAnimationCurve]
|
||||
// public float4[] VisibilityCurve;
|
||||
|
||||
public override Behavior CreateInstance(EquippedItem item)
|
||||
{
|
||||
return new Reflector(this, item);
|
||||
}
|
||||
|
||||
public override Behavior CreateInstance(ConsumableItemEffect item)
|
||||
{
|
||||
return new Reflector(this, item);
|
||||
}
|
||||
}
|
||||
|
||||
public class Reflector : Behavior
|
||||
{
|
||||
private readonly PerformanceStat _crossSection;
|
||||
|
||||
public Reflector(ReflectorConfig data, EquippedItem item) : base(data, item)
|
||||
public Reflector(RuntimeBehaviorDefinition definition, EquippedItem item) : base(definition, item)
|
||||
{
|
||||
_crossSection = data.CrossSection;
|
||||
_crossSection = definition.PerformanceStat(1, new PerformanceStat());
|
||||
RegisterPerformanceStat("CrossSection", _crossSection);
|
||||
}
|
||||
|
||||
public Reflector(ReflectorConfig data, ConsumableItemEffect item) : base(data, item)
|
||||
public Reflector(RuntimeBehaviorDefinition definition, ConsumableItemEffect item) : base(definition, item)
|
||||
{
|
||||
_crossSection = data.CrossSection;
|
||||
_crossSection = definition.PerformanceStat(1, new PerformanceStat());
|
||||
RegisterPerformanceStat("CrossSection", _crossSection);
|
||||
}
|
||||
|
||||
public override bool Execute(float dt)
|
||||
|
|
|
|||
Loading…
Reference in a new issue