| 1 | class BehaviourWander extends ChaoBehaviour |
| 2 | { |
| 3 | startBehaviour () |
| 4 | { |
| 5 | Chao.Instance.walkToPosition(new vector(Math.randomRange(0, Chao.Instance.scene.real_size.x), Math.randomRange(0, Chao.Instance.scene.real_size.y))); |
| 6 | } |
| 7 | |
| 8 | update (deltaTime) |
| 9 | { |
| 10 | if (!Chao.Instance.walking) |
| 11 | this.endBehaviour(); |
| 12 | } |
| 13 | } |