コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        RaycastHit hit;

        if (cVision.PlayerDetected(out hit))
        {
            cNavMesh.followObj = hit.transform;
            mEstados.ActivarEstado(mEstados.EstadoPersecusion);
            return;
        }

        if (cNavMesh.Meta())
        {
            nextWP = (nextWP + 1) % WayPoints.Length;
            ActualizarWPD();
        }
    }