From ce684b1d16247499002bae34460a80236679897f Mon Sep 17 00:00:00 2001 From: Matt Thorson Date: Sun, 13 Sep 2020 17:38:48 -0700 Subject: [PATCH] State simplified --- src/Components/Logic/StateMachine.bf | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/Components/Logic/StateMachine.bf b/src/Components/Logic/StateMachine.bf index 2490eaf..3b56fd2 100644 --- a/src/Components/Logic/StateMachine.bf +++ b/src/Components/Logic/StateMachine.bf @@ -111,19 +111,9 @@ namespace Strawberry public class State { - public delegate void() Enter; - public delegate TIndex() Update; - public delegate void() Exit; - - public ~this() - { - if (Enter != null) - delete Enter; - if (Update != null) - delete Update; - if (Exit != null) - delete Exit; - } + public delegate void() Enter ~ delete _; + public delegate TIndex() Update ~ delete _; + public delegate void() Exit ~ delete _; } } }