1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use Component;
use Navigable;
/// This is an example on how to use the Navigable trait to flag non-walkable pathfinding points.
/// Here we are defining a IsWalkable component that will be used to flag non-walkable points.
;
/// We are implementing the Navigable trait for IsWalkable, where walkable points are flagged based
/// on the boolean value of the IsWalkable component, blocks-sight is irrelevant for this example.
///
/// Append is implemented to allow combining multiple IsWalkable components, where the result will
/// be non-walkable if any of the components is non-walkable.
///
/// is_default is implemented to allow skipping from the cache when the IsWalkable component is
/// the default value (in this case, true).