Reuse same tween for monster shaking
authorMegaBrutal <code+git@megabrutal.com>
Fri, 29 Dec 2017 23:25:00 +0000 (00:25 +0100)
committerMegaBrutal <code+git@megabrutal.com>
Fri, 29 Dec 2017 23:25:00 +0000 (00:25 +0100)
commitb69fd06095d7d61ccbcd237298aeb306331991c3
treed4a87421bbdbd5db86abd895165e213da98e4236
parent3657126690124fe9be25d75600ba29b0fd50db63
Reuse same tween for monster shaking

Now one tween is created and reused to shake a monster when it is
damaged. As a side-effect, the amplitude of shaking is now constant
while it was random in the previous commit.

I decided to use one tween for a monster to avoid creating a memory
leak by leaving unused tweens in memory.

modified:   ld40.js
ld40.js