Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function moveGuards(){
- var guardDirection = "right";
- if (guards[0].x >= 14 * tileSize && guardDirection == "right") {
- guardDirection = "left";
- guards[0].gotoAndPlay("left");
- guards[0].x--;
- } else {
- guardDirection = "right";
- guards[0].x++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement