Example #1
0
    private void Update()
    {
        this.CheckRightClickTile();

        if (Input.GetKeyDown(KeyCode.Space))
        {
            if ((this._start != null) && (this._goal != null))
            {
                this._path = Astar_script.GetPath(this._start.Position, this._goal.Position);
                this.Visualize(_path, Color.blue);
            }
        }
    }
Example #2
0
 public void GeneratePath()
 {
     this._monsterPath = Astar_script.GetPath(this._portalStartSpawnPos, this._portalEndSpawnPos);
 }