Merged Jose's Changes, dropped 'simple' packages

3 views
Skip to first unread message

Daniel Zwolenski

unread,
Dec 24, 2012, 1:46:50 AM12/24/12
to fx-g...@googlegroups.com
Hey,

I merged in Jose's changes to do with Path routing into the main repo. The merge was a little messy because we'd renamed LevelPanel to Level and changed everything to use LevelFactory objects, but I think I got it all sorted. Let me know if I missed anything though. 

I also made some tweaks to Jose's code. Functionally it is exactly the same but I changed it to calculate the distance off the path instead of exposing Points (which limits us to straight lines).

To do the calculation, it iterates through the PathElements and does an if-instanceof-else statement (ugly but not much else to work with in this case). If it's a LineTo or MoveTo it does the normal point-point distance calculation. For anything else it throws a not-supported exception, but we could for example implement CubicCurve distance calculations, or whatever, whenever we want. 

It would be really nice for us if JFX PathElement had a getDistance() method on it or something though, not sure if that's it's core business or not (i.e. should we raise a JIRA)? 

I also dropped out the .'game.simple' sub-packages and everything is now under straight under Defender. No functional change here, just simplification. 

I have updated the executable JAR available for download on the wiki: https://bytebucket.org/rbair/fx-games/wiki/release/defender-jfx.jar 

Cheers, 
Dan

Reply all
Reply to author
Forward
0 new messages