public RenderingState AddState(string name, IAnimation animation) { var state = new RenderingState(name, animation); _states.Add(name, state); return(state); }
public void RemoveState(RenderingState state) { _states.Remove(state.Name); if (CurrentState == state) { CurrentState = null; } }
public void RemoveState(string stateName) { var state = GetState(stateName); if (state == null) { return; } _states.Remove(stateName); if (CurrentState == state) { CurrentState = null; } }
public void SetState(string name) { CurrentState = GetState(name); }