Compare commits
No commits in common. "main" and "moar-levels" have entirely different histories.
main
...
moar-level
@ -17,10 +17,10 @@ export const Title = ({ setReady }: TitleProps) => {
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<h3 className="warning">
|
||||
WASD/arrow keys to move. SPACE/ENTER to interact after highlighting
|
||||
with the mouse.
|
||||
</h3>
|
||||
<p>
|
||||
WASD/arrow keys to move, space/enter to interact after highlighting with
|
||||
the mouse
|
||||
</p>
|
||||
|
||||
<br />
|
||||
<hr />
|
||||
|
@ -139,17 +139,11 @@ export class Grid extends System {
|
||||
);
|
||||
|
||||
if (collidingEntities.length > 0) {
|
||||
// ensure everything that is a "pushable" or "colliding" which will collide with the entity
|
||||
// can actually continue moving in the direction
|
||||
// i.e. key going into a door or function going into an application
|
||||
const allEntitiesInPreviousCellCanCollide = Array.from(
|
||||
this.grid[currentPosition.y][currentPosition.x],
|
||||
)
|
||||
.map((id) => game.getEntity(id)!)
|
||||
.filter(
|
||||
(entity) =>
|
||||
entity.hasComponent(ComponentNames.Colliding) ||
|
||||
entity.hasComponent(ComponentNames.Pushable),
|
||||
)
|
||||
.every((entity) =>
|
||||
collidingEntities.every((collidingEntity) =>
|
||||
Collision.canCollide(entity.name, collidingEntity.name),
|
||||
|
Loading…
Reference in New Issue
Block a user