Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Tunied committed Jun 8, 2017
1 parent 632363b commit f7cf27f
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,40 @@ a path find for tilebase game in unity

## How to use

### Extend base engine

before you use `CEPathFind`, you shoud provide an pathfind engine with overrde this class `CEPathFindBasic.cs`


```csharp

//Get an tile property
//you can check A start path find wiki for more info about score.
override public void GetTileProperty (int _tileX, int _tileY,
CEPathFindNode _star, CEPathFindNode _end,
out bool _isWalkable, out int _score)
{
_isWalkable = true;
_score = 1;
}


override public bool isTileWalkable (int _tileX, int _tileY)
{
return true;
}


override public TILE_SERACH_TYPE GetTileSerachType ()
{
return TILE_SERACH_TYPE.EIGHT_DIRECTION_FIX_CORNER;
}

```


### Call pathfind

there is two way to use it.

- Immediate return
Expand Down Expand Up @@ -43,4 +77,24 @@ private const int EACH_TICK_SEARCH_NODE_NUM = 50;
```


---
## PathFindType

### 4 direction
![img1](md/img3.jpg)

### 8 direction
![img1](md/img2.jpg)

### 8 direction with fix corner
![img1](md/img1.jpg)


## Issue

e-mail: [email protected]


thanks.
Eran

0 comments on commit f7cf27f

Please sign in to comment.