Clunkily use a collision world instead of manual broad phase
Getty Ritter
5 years ago
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | // create the player | |
84 | let ball = { | |
85 | let mut h = w.write_resource::<World>(); | |
86 | Blocking::new_ball(&mut h) | |
87 | }; | |
88 | w.create_entity() | |
83 | w.create_entity_unchecked() | |
89 | 84 | .with(Position { |
90 | 85 | x: 3.0 * consts::TILE_SIZE, |
91 | 86 | y: 3.0 * consts::TILE_SIZE, |
97 | 92 | .with(Collision { |
98 | 93 | has_collision: false, |
99 | 94 | }) |
100 |
.with( |
|
95 | .with({ | |
96 | let mut h = w.write_resource::<World>(); | |
97 | Blocking::new_ball(&mut h) | |
98 | }) | |
101 | 99 | .build(); |
102 | 100 | } |