Beispiel #1
0
        /// <summary>
        /// Registers a new state
        /// </summary>
        /// <param name="state">State to register</param>
        public void RegisterState(JState state)
        {
            statesList.Add(state);

            //We set a reference to this machine to the state so it will be able
            //to change the current state from within any state
            state.SetStateMachine(this);
        }
Beispiel #2
0
		/// <summary>
		/// Registers a new state
		/// </summary>
		/// <param name="state">State to register</param>
		public void RegisterState(JState state)
		{
			statesList.Add(state);

			//We set a reference to this machine to the state so it will be able
			//to change the current state from within any state
			state.SetStateMachine(this);
		}