keplersj / BoatCraft

Rails had their turn, now out to the Minecraftian seas.
MIT License
6 stars 7 forks source link

Add Methods to Directly modify a boats velocity #127

Closed keplersj closed 10 years ago

keplersj commented 10 years ago

Faster boats!

viliml commented 10 years ago

It would involve copying a 60-line function just to override it and change 2-3 lines. Or reflection. Will look into it.

keplersj commented 10 years ago

All traits interacting with the Boat object should be able to change how fast it can go.

For example:

Boats containing Blocks can opt to move slower.

Boats made of rubber should go faster than their wooden, metal, and crystalline counterparts.

Sent from my iPhone

On Feb 13, 2014, at 1:00 PM, viliml notifications@github.com wrote:

It would involve copying a 60-line function just to override it and change 2-3 lines. Or reflection. Will look into it.

— Reply to this email directly or view it on GitHub.

viliml commented 10 years ago

Actually, you can already do that using the update method I added. Just multiply the velocity by, say, 1.25, and the boat will go 25% faster, no matter how fast it would normally go. And, for self-propelled boats, just addVelocity() to make it go faster, or, if it would normally not move, make it move.

keplersj commented 10 years ago

Fantastic!

Sent from my iPhone

On Feb 14, 2014, at 10:39 AM, viliml notifications@github.com wrote:

Closed #127.

— Reply to this email directly or view it on GitHub.