This commit is contained in:
@@ -15,11 +15,19 @@ public class StateMachine {
|
||||
this.menus = new Stack<>();
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
for (BaseView view : menus) {
|
||||
view.onKill();
|
||||
}
|
||||
menus.clear();
|
||||
}
|
||||
|
||||
public void pushState(BaseView menu) {
|
||||
menus.add(menu);
|
||||
}
|
||||
|
||||
public void popState() {
|
||||
menus.getLast().onKill();
|
||||
menus.pop();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user