Esempio n. 1
0
        public RenderingState AddState(string name, IAnimation animation)
        {
            var state = new RenderingState(name, animation);

            _states.Add(name, state);
            return(state);
        }
Esempio n. 2
0
        public void RemoveState(RenderingState state)
        {
            _states.Remove(state.Name);

            if (CurrentState == state)
            {
                CurrentState = null;
            }
        }
Esempio n. 3
0
        public void RemoveState(string stateName)
        {
            var state = GetState(stateName);

            if (state == null)
            {
                return;
            }

            _states.Remove(stateName);

            if (CurrentState == state)
            {
                CurrentState = null;
            }
        }
Esempio n. 4
0
 public void SetState(string name)
 {
     CurrentState = GetState(name);
 }