Harder then I though
Fragment of a discussion from Talk:Bullet Shielding
Jump to navigation
Jump to search
Here you go, enjoy! https://gist.github.com/Chase-san/7edb0974df656bec12d8
Sorry that it is a mess and for all the custom/internal class usage. But I don't think it is anything to foreign.
Vector is Point2D on steroids. Line is just Line2D with custom initializer. MintState tracks all data. It updates energy according to HitByBullet and BulletHit as well.
One last note. This is a very basic bullet shield. It might not work 100%. But it does work. That is enough for people to take it and run I think.
I'll rewrite it to not use special classes soon.