public void Execute() { if (currentState == null) { return; } State <T> state = currentState.CheckTransitions(); if (state != null) { currentState = state; } currentState.Execute(); }