Example #1
0
 // Update is called once per frame
 void Update()
 {
     if (MyTimer.Wait(period, ref timer) && Input.GetMouseButton(1))
     {
         GizmosDrawClick = Camera.main.ScreenPointToRay(Input.mousePosition).origin;
         Way             = PathFinderAstar.GetPath(out CheckedCells, Player.transform.position, Camera.main.ScreenPointToRay(Input.mousePosition).origin, Detalisation, Player.transform.localScale.x, diagonalAdjacent);
         // Debug.Log("Прошло " + period + " сек.");
     }
 }
 public void UpdateTarget(Vector3 position)
 {
     way           = PathFinderAstar.GetPath(Character.transform.position, position, Character.transform.localScale.x, Character.transform.localScale.x, diagonalAdjacent);
     currentTarget = Character.transform.position;
     IsMove        = true;
 }