GitLab system status is available here and here

Commit a712a935 authored by Calvin Stephano's avatar Calvin Stephano
Browse files

Delete Spaceship.js

parent 0e5f2dd1
// Spaceship prefab
class Spaceship extends Phaser.GameObjects.Sprite {
constructor(scene, x, y, texture, frame, pointValue) {
super(scene, x, y, texture, frame);
scene.add.existing(this); // Add to existing scene
this.points = pointValue; // Store pointValue
this.moveSpeed = game.settings.spaceshipSpeed; // Pixels per frame
}
update() {
// Move spaceship left
this.x -= this.moveSpeed;
// Wrap around from left edge to right edge
if(this.x <= 0 - this.width) {
this.reset();
}
}
// Position reset
reset() {
this.x = game.config.width;
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment