This is pretty darn good at this point. I refactored the reflection into
a function:
VR = BallBounceReflection(VR, Obstacle[i]);
And added four obstacles. However, as you will note from the debugging
graphics, the obstacles are treating the Center of the Board as their
point of reflection Center, so I need to revise that. But good enough
for another day.
Maybe I'll have stuff change colors on impact next. And then again,
maybe not.
Also, hitTest() might be more suitable than SomeObject.contains(), but
the documentation for that function has not made any sense to me thus
far, so we'll see.
Previous Brett Code Index Next in Series
Copyright © 2013 Brett Paufler