how do I get my object (while programing) from point B to point A
Answers
Answered by
1
Answer:
In your main loop, before you call Draw you change the position of the zombie. Make its position (on X or Y axis) one step closer to the player.
This can easily be done since you know the current position of the player. If zombie-X is higher than player-X, then decrease zombie-X. Or if opposite then increase zombie-X. Same with the Y position.
To not make the zombie just walk up-down (or left-right) you adjust the X position of the zombie every second time in the main loop, and the Y position every second time. Or you could select X or Y randomly.
In short, your "point B" is always the players current position.
Explanation:
Similar questions
Geography,
7 hours ago
Social Sciences,
13 hours ago
Music,
8 months ago
Science,
8 months ago
Math,
8 months ago