|
-
Thanks for the advice. Exactly what I was hoping for.
I havenow changed my implementation so that I have a NullVector base class (without first coordinates, they are assumed 0 in the calculations), which should be a bit faster when you don't need the first coordinates. Then my Vector class extends this. I plan to use vectors to describe levels (for collision), so it makes sense to have a class with two sets of coordinates. Not too sure about the name NullVector though, but I couldn't think of anything appropriate. (edit: think I'm going to go for DisplacementVector which extends PositionVector, but I'm not sure yet).
As for calculating the angle each time something changes, well, that was a choice I had to make. Faster getting or faster setting of variables. It should be easy to change anyway.
Last edited by Fall_X; 08-29-2007 at 08:00 AM.
-
I saw you site & followed the discussion on tile engines. I think we have a common interest http://board.flashkit.com/board/showthread.php?t=742953
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|