Compare commits

..

No commits in common. "main" and "moar-levels" have entirely different histories.

2 changed files with 5 additions and 11 deletions

View File

@ -17,10 +17,10 @@ export const Title = ({ setReady }: TitleProps) => {
</a> </a>
</p> </p>
<br /> <br />
<h3 className="warning"> <p>
WASD/arrow keys to move. SPACE/ENTER to interact after highlighting WASD/arrow keys to move, space/enter to interact after highlighting with
with the mouse. the mouse
</h3> </p>
<br /> <br />
<hr /> <hr />

View File

@ -139,17 +139,11 @@ export class Grid extends System {
); );
if (collidingEntities.length > 0) { if (collidingEntities.length > 0) {
// ensure everything that is a "pushable" or "colliding" which will collide with the entity // i.e. key going into a door or function going into an application
// can actually continue moving in the direction
const allEntitiesInPreviousCellCanCollide = Array.from( const allEntitiesInPreviousCellCanCollide = Array.from(
this.grid[currentPosition.y][currentPosition.x], this.grid[currentPosition.y][currentPosition.x],
) )
.map((id) => game.getEntity(id)!) .map((id) => game.getEntity(id)!)
.filter(
(entity) =>
entity.hasComponent(ComponentNames.Colliding) ||
entity.hasComponent(ComponentNames.Pushable),
)
.every((entity) => .every((entity) =>
collidingEntities.every((collidingEntity) => collidingEntities.every((collidingEntity) =>
Collision.canCollide(entity.name, collidingEntity.name), Collision.canCollide(entity.name, collidingEntity.name),