walkTowardsTarget()

Found in:

private void walkTowardsTarget()
  {
    if(hero != null){
      transform.position = Vector2.MoveTowards(transform.position, new Vector2(hero.transform.position.x, 0), Time.deltaTime * speed);
      if(currentlyAnimating == false){

        StartCoroutine(runLegMovement());
      }
    }
    else { Debug.Log("Lost hero"); }
  }


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *