User prompt
Implement a method within the Player class that allows shooting lasers.
User prompt
Create a Laser Class
User prompt
Implement a method within the Player class that allows shooting lasers.
User prompt
Create a Laser Class
User prompt
Make the laser go up.
User prompt
Add laser asset that shoots the rocks from the player asset.
User prompt
Make the obstacles a bit smaller and make the player bigger.
Remix started
Copy Quintillion Quadrilaterals
===================================================================
--- original.js
+++ change.js
@@ -62,12 +62,12 @@
var Laser = Container.expand(function () {
var self = Container.call(this);
var laserGraphics = self.attachAsset('laser', {
anchorX: 0.5,
- anchorY: 1
+ anchorY: 0.5
});
- laserGraphics.scale.set(0.8); // Scale down the laser
- self.speed = 10; // Set speed
+ laserGraphics.scale.set(0.5); // Scale down the laser
+ self.speed = 10; // Speed of the laser
self.move = function () {
self.y -= self.speed;
};
});
@@ -88,14 +88,8 @@
};
self.update = function () {
// Player update logic
};
- self.shootLaser = function () {
- var laser = new Laser();
- laser.x = self.x;
- laser.y = self.y - self.height / 2;
- game.addChild(laser);
- };
});
// Stopwatch class
var Stopwatch = Container.expand(function () {
var self = Container.call(this);
Spaceship 2D Pixel.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Asteroid 2D Pixel.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Galaxy Background 2D Pixel.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.