for pathfinding we are now taking into consideration all tiles, looking for 'collides' property
This commit is contained in:
parent
7576cea7e0
commit
391fe7eed3
3 changed files with 167 additions and 146 deletions
|
@ -37,6 +37,15 @@ export class ActiveEventList {
|
|||
any(): boolean {
|
||||
return Array.from(this.eventMap.values()).reduce((accu, curr) => accu || curr, false);
|
||||
}
|
||||
anyExcept(...exceptions: UserInputEvent[]): boolean {
|
||||
const userInputEvents = Array.from(this.eventMap);
|
||||
for (const event of userInputEvents) {
|
||||
if (event[1] && !exceptions.includes(event[0])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//this class is responsible for catching user inputs and listing all active user actions at every game tick events.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue