This commit is contained in:
zeno 2024-02-28 11:59:54 -05:00
commit 6b926e53bf
19 changed files with 1365 additions and 0 deletions

14
js/event.js Normal file
View file

@ -0,0 +1,14 @@
/*
Code for handling events.
*/
function GameEvent(type, target, data, canvas) {
this.type = type;
this.data = data;
this.canvas = canvas;
this.target = target;
for (let interaction of target.interactions) {
if (interaction(this)) return this;
}
}