示例#1
0
        public RenderingState AddState(string name, IAnimation animation)
        {
            var state = new RenderingState(name, animation);

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

            if (CurrentState == state)
            {
                CurrentState = null;
            }
        }
示例#3
0
        public void RemoveState(string stateName)
        {
            var state = GetState(stateName);

            if (state == null)
            {
                return;
            }

            _states.Remove(stateName);

            if (CurrentState == state)
            {
                CurrentState = null;
            }
        }
示例#4
0
 public void SetState(string name)
 {
     CurrentState = GetState(name);
 }