function update(game: Game, entity: Entity) {
let collide = game.World.Collide2D[entity];
let trigger = game.World.Trigger[entity];
for (let collision of collide.Collisions) {
let other_collide = game.World.Collide2D[collision.Other];
if (trigger.Mask & other_collide.Layers) {
dispatch(game, trigger.Action, [entity, collision.Other]);
}
}
}