Difference between revisions of "Team:KU Leuven/Secret"
Line 114: | Line 114: | ||
} | } | ||
} | } | ||
+ | |||
+ | if (hero.x < 0){ | ||
+ | hero.x=canvas.width; | ||
+ | } | ||
+ | |||
+ | if (hero.y < 0){ | ||
+ | hero.y=canvas.height; | ||
+ | } | ||
+ | |||
+ | if (hero.x > canvas.width){ | ||
+ | hero.x=0; | ||
+ | } | ||
+ | |||
+ | if (hero.y > canvas.height){ | ||
+ | hero.y=0; | ||
+ | } | ||
+ | |||
}; | }; | ||
Revision as of 17:53, 17 August 2015