[update] Implemented a damage calculation.

This commit is contained in:
2019-10-09 00:00:00 +00:00
parent e17c312871
commit 5e2623adf1
3 changed files with 47 additions and 2 deletions

View File

@@ -43,6 +43,14 @@ int main(string[] args) {
context.actor.Update();
context.posteffect.Update();
const dmg = context.CalculateDamage();
if (dmg.damage != 0) {
"damage: %f (%f)".writefln(dmg.damage, beat);
}
if (dmg.nearness != 0) {
"nearness: %f (%f)".writefln(dmg.nearness, beat);
}
context.StartDrawing();
context.DrawBackground();