User prompt
Please add health points and a health bar to the hero spaceship.
User prompt
make the auto-fire rate on the player 50% faster.
User prompt
Make the Hero Spaceship auto-fire bullets at a fixed rate rather than firing bullets when you press the mouse.
User prompt
Double the speed of the enemy bullets.
User prompt
Make the enemy bullets twice as fast.
User prompt
Enemy bullets should fly towards the player, or rather where the player was when the enemy bullet was fired.
User prompt
Make the enemy shoot bullets towards the player.
User prompt
Make the enemy shoot bullets towards where the hero currently is. Make sure that the bullets get garbage collected when they fly off screen.
User prompt
Any bullet should fly towards the hero spaceship from the original firing position.
User prompt
Please make enemies shoot bullets in my general direction.
User prompt
Please make the enemy shoot bullets in my general direction.
User prompt
Please add code that allows me to be game over. I should game over if I touch an enemy.
User prompt
I get zero health when I get hit by an enemy now, regardless if a bullet is on the screen, but the game over method does not seem to be called. Please fix that.
User prompt
The code to determine if I'm game over should always run regardless if there is an active player bullet on the screen.
User prompt
I only seem to be able to be game over if there is a bullet on the screen. Please fix this.
User prompt
If the hero spaceship touches an enemy, it should instantly die, so HP should be set to zero and game over should be called.
User prompt
Please call the game over method if my hero spaceship intersects with an enemy.
User prompt
Please make me be game over if I intersect with an enemy.
User prompt
So, you should be game over when you are out of HP and you have a health bar on your spaceship and you lose HP when you're hit by a bullet or you die instantly if you're hit by an enemy. Please implement this based on the previous conversation.
User prompt
Please make the hero spaceship follow the mouse at a fixed pace. The spaceship should always move towards the last known location of the mouse.
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'hero.update = function () {' Line Number: 79
User prompt
Please update the mouse movement code to always have the spaceship move towards the last known location of the mouse.
User prompt
Please make the Hero Spaceship follow the mouse at a fixed pace.
Initial prompt
Space Shooter
===================================================================
--- original.js
+++ change.js
@@ -39,9 +39,9 @@
var bulletGraphics = self.attachAsset('enemyBullet', {
anchorX: 0.5,
anchorY: 0.5
});
- self.speed = 10;
+ self.speed = 20;
self.update = function () {
self.x += self.direction.x * self.speed;
self.y += self.direction.y * self.speed;
if (self.y > 2732 + bulletGraphics.height || self.x < -bulletGraphics.width || self.x > 2048 + bulletGraphics.width) {