Beispiel #1
0
        /// <summary>
        /// 생성자
        /// </summary>
        /// <param name="_animator"></param>
        /// <param name="_spriteRenderer"></param>
        public UnitState(UnitStateParameter _param)
        {
            m_Command = eUnitCommand.Idle;

            m_Parameter                  = new UnitStateParameter();
            m_Parameter.m_Unit           = _param.m_Unit;
            m_Parameter.m_SpriteRenderer = _param.m_SpriteRenderer;
            m_Parameter.m_Animator       = _param.m_Animator;
        }
Beispiel #2
0
        /// <summary>
        /// 대기 상태로 설정
        /// </summary>
        public void SetToIdle()
        {
            m_Command = eUnitCommand.Idle;

            m_State = null;
            UnitStateParameter param = new UnitStateParameter();

            param.m_Unit           = this;
            param.m_SpriteRenderer = m_SpriteRenderer;
            param.m_Animator       = m_Animator;

            m_State = new UnitStateIdle(param);
            m_State.Draw();
        }