예제 #1
0
    public void PlayPathWaypoint(MonsterWaypoint start)
    {
        if (m_EnemyStatus == EnemyStatus.PathMove)
        {
            return;
        }

        SetPathWaypoint(start);
        StartCoroutine(_PlayPathWaypoint());
    }
예제 #2
0
    public void SetPathWaypoint(MonsterWaypoint start)
    {
        MonsterWaypoint tmp = start;

        m_PathWaypoint[0] = tmp;
        for (int i = 1; i < C_MAXPOINT; i++)
        {
            if (tmp == null)
            {
                m_PathWaypoint[i] = null;
                break;
            }
            tmp = m_PathWaypoint[i] = tmp.GetNextWaypoint();
        }
    }
예제 #3
0
    public void NextPlayMove(Enemy enemy)
    {
        if (m_arrRatio == null || m_arrRatio.Length <= 0)
        {
            return;
        }
        int             ix       = GameUtil.GetArrRandom(m_arrRatio);
        MonsterWaypoint next_tmp = m_arrNext[ix];

        enemy.PlayPathWaypoint(next_tmp);

        //Transform target = next_tmp.transform;
        //float rspeed = Random.Range(0.5f, enemy.m_MonsterInfo.MOV_SPD);
        //enemy.transform.DOMove(target.position, rspeed).SetEase(Ease.Linear).SetSpeedBased().OnComplete(() =>
        //{
        //    en_tmp.PlayNextWaypoint(next_tmp);
        //});
    }