Пример #1
0
        private void _CheckNearestCharAndExcute(CharHandler ch, float dis)
        {
            float touchDis = _charHandler.m_CharData.m_fAtkRange;

            if (CheckSlide(dis, touchDis))
            {
                _charHandler.ToSlide(ch.m_ParentTrans, touchDis);
            }
            else
            {
                if (dis > touchDis)
                {
                    _charHandler.ToRun(ch.m_ParentTrans, touchDis);
                }
                else
                {
                    _charHandler.ToAttack(ch);
                }
            }
        }