public override void OnUse(Sprite sprite, Sprite target) { var trap = new Trap() { Duration = 5, EffectRadius = 1, }; //setup script callbacks Trap.CreateTrap(sprite, trap); { trap.Activated = OnActivated; trap.Toggle = OnSelectionToggle; trap.Tripped = OnTriggeredBy; }; }