Exemplo n.º 1
0
    private IEnumerator updateMovementPath()
    {
        while (gameObject.activeSelf)
        {
            yield return(new WaitForSeconds(0.75f));

            Vector3 enemyPosition = new Vector3();
            if (m_targetID != Utilities.INVALID_ID && isTargetInVisibleSight(out enemyPosition))
            {
                if (!m_tankShooting.isTargetInAttackRange(enemyPosition))
                {
                    m_tankMovement.moveTo(enemyPosition);
                }
            }
        }
    }