User prompt
Increase the size of the enemies a bit
User prompt
Make the player a bit bigger
User prompt
Add a score
User prompt
Spawn new enemies every 8 seconds randomly on the map
User prompt
Make the player faster every 5 seconds as well
User prompt
Increase the speed of the enemies every 5 seconds
User prompt
Add touch function to move the player around
User prompt
Make the player move, using Touch
User prompt
Add touch control
Initial prompt
Manhunt
===================================================================
--- original.js
+++ change.js
@@ -44,13 +44,18 @@
y: 0
};
stage.on('down', function (obj) {
touchStart = obj.event.getLocalPosition(self);
+ hero.move(touchStart, touchStart);
});
- stage.on('up', function (obj) {
+ stage.on('move', function (obj) {
touchEnd = obj.event.getLocalPosition(self);
hero.move(touchStart, touchEnd);
});
+ stage.on('up', function (obj) {
+ touchStart = obj.event.getLocalPosition(self);
+ hero.move(touchStart, touchStart);
+ });
LK.on('tick', function () {
for (var i = 0; i < enemies.length; i++) {
enemies[i].chase(hero);
if (enemies[i].intersects(hero)) {