Exemplo n.º 1
0
        /// <summary>
        /// Устанавливает состояение по умолчанию как текущее.
        /// </summary>
        public void SetDefaultState()
        {
            if (currentState != null)
            {
                currentState.Stop();
            }

            AntLog.Assert(defaultState == null, "Default <b>State</b> is not defined!", true);
            currentState = defaultState;
            currentState.Reset();
            currentState.Start();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Устанавливает состояение по умолчанию как текущее.
        /// </summary>
        public void SetDefaultState()
        {
            if (currentState != null)
            {
                currentState.Stop();
            }

            if (defaultState != null)
            {
                currentState = defaultState;
                currentState.Reset();
                currentState.Start();
            }
            else
            {
                AntLog.Report("AIControl", "Default State not defined!");
            }
        }