function update(game: Game, entity: Entity, delta: number) {
let toggle = game.World.Toggle[entity];
toggle.SinceLast += delta;
if (toggle.SinceLast > toggle.Frequency) {
toggle.SinceLast = 0;
if ((game.World.Signature[entity] & toggle.Mask) === toggle.Mask) {
game.World.Signature[entity] &= ~toggle.Mask;
} else {
game.World.Signature[entity] |= toggle.Mask;
}
}
}