Bypass configs for no-payload behaviors
This commit is contained in:
parent
6d459c406b
commit
068bc11622
11 changed files with 103 additions and 97 deletions
|
|
@ -4,26 +4,13 @@
|
|||
|
||||
using System;
|
||||
using System.Linq;
|
||||
[Inspectable, Order(-20)]
|
||||
public class TriggerConfig : RuntimeBehaviorConfig
|
||||
{
|
||||
public override Behavior CreateInstance(EquippedItem item)
|
||||
{
|
||||
return new Trigger(this, item);
|
||||
}
|
||||
public override Behavior CreateInstance(ConsumableItemEffect item)
|
||||
{
|
||||
return new Trigger(this, item);
|
||||
}
|
||||
}
|
||||
|
||||
public class Trigger : Behavior, IActivatedBehavior
|
||||
{
|
||||
public bool _pulled;
|
||||
public bool Pulled => _pulled;
|
||||
|
||||
public Trigger(TriggerConfig data, EquippedItem item) : base(data, item) { }
|
||||
public Trigger(TriggerConfig data, ConsumableItemEffect item) : base(data, item) { }
|
||||
public Trigger(RuntimeBehaviorDefinition definition, EquippedItem item) : base(definition, item) { }
|
||||
public Trigger(RuntimeBehaviorDefinition definition, ConsumableItemEffect item) : base(definition, item) { }
|
||||
|
||||
public override bool Execute(float dt)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue