示例#1
0
    IEnumerator FollowPath(List <Waypoint> path)
    {
        foreach (Waypoint waypoint in path)
        {
            transform.position = new Vector3(waypoint.transform.position.x, waypoint.transform.position.y + 3, waypoint.transform.position.z);
            yield return(new WaitForSeconds(moveSpeed));
        }

        EnemyHealth enemyHealth = GetComponent <EnemyHealth>();

        enemyHealth.ProcessDestruction();
        baseHP.decreaseHP();
    }