I'm not sure I follow you here. What type of a situation are you
referencing? Even if I wanted to teleport the player, I wouldn't
want to teleport them into a wall.
----- Original Message -----
From: Cara Quinn <[email protected]
To: Gamers Discussion list <[email protected]
Date sent: Sun, 18 Aug 2013 13:14:27 -0700
Subject: Re: [Audyssey] looking for
programmingadvice:cyntaxdifferencebetween bgt and java
Hi again John,
Just as a follow-up to my own note here, I thought I'd add that I
personally prefer not to have collision detection called from
within any movement code.
I think it's good practice to have your methods only doing what
they say they will. I.E. movement only moves. Collision detection
only detects collisions.
this way if you want to move your player for some other reason
than a traditional game movement, you can always call your
player's movement methods and not need to worry about some other
method getting called somewhere to get in the way of what you'd
like to do. Does this make sense?
Your collision detection method can either report back which
objects collided, or simply call the appropriate methods on those
objects that collided with each other.
For example, if two objects collide, then call the touch methods
on each of those objects. That way each object will do what it is
supposed to when it is touched by another object.
Hope this helps!
Have a great day!
Cara :)---
View my Online Portfolio at:
http://www.onemodelplace.com/CaraQuinn
Follow me on Twitter!
https://twitter.com/ModelCara
---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].