Question by
Ephenodrom · Jan 21, 2017 at 06:46 AM ·
2dmovement scripttile
Grid based movement, more tiles per round
Hello there,
I am currently working on a grid based movement where you walk tile by tile after clicking a button.
I have a list with several directions ( Example : UP,UP,RIGHT,RIGHT,UP), got my code for clicking the button and I got my code for smooth moving in a direction ( x or y ) +1 depending on the direction in the list. And i also got a Script called "Player" on my player prefab, that includes the update method.
What I want to know is, where should I put my code ?
Should I process the directions from the list in the update method of my player or should I call a another method on button click that processes the directions with StartCoroutine and yield ?
Example for what I want. https://www.youtube.com/watch?v=PfU3iFkBFDU
Comment