User prompt
Fix Bug: 'Uncaught TypeError: window.addEventListener is not a function' in this line: 'window.addEventListener('keydown', handleKeyDown);' Line Number: 108
User prompt
The player isn't moving with the WASD keys
User prompt
Fix Bug: 'Uncaught TypeError: window.addEventListener is not a function' in this line: 'window.addEventListener('keydown', handleKeyDown);' Line Number: 108
User prompt
Add a player object that can be moved with WASD, arrow keys or touch enabled virtual joystick
Initial prompt
Minion Control
var Minion = Container.expand(function () {
var self = Container.call(this);
var minionGraphics = self.createAsset('minion', 'Minion Graphics', .5, .5);
self.speed = 5;
self.move = function () {};
self.attack = function () {};
});
var Enemy = Container.expand(function () {
var self = Container.call(this);
var enemyGraphics = self.createAsset('enemy', 'Enemy Graphics', .5, .5);
self.speed = -5;
self.move = function () {};
self.attack = function () {};
});
var HeroBullet = Container.expand(function () {
var self = Container.call(this);
var bulletGraphics = self.createAsset('heroBullet', 'Hero Bullet Graphics', .5, .5);
self.speed = 10;
self.move = function () {};
});
var EnemyBullet = Container.expand(function () {
var self = Container.call(this);
var bulletGraphics = self.createAsset('enemyBullet', 'Enemy Bullet Graphics', .5, .5);
self.speed = -10;
self.move = function () {};
});
var Game = Container.expand(function () {
var self = Container.call(this);
var minions = [];
var enemies = [];
var heroBullets = [];
var enemyBullets = [];
for (var i = 0; i < 5; i++) {
var minion = new Minion();
minion.x = 2048 / 2;
minion.y = 2732 / 2 + i * 100;
minions.push(minion);
self.addChild(minion);
}
LK.on('tick', function () {
for (var i = 0; i < minions.length; i++) {
minions[i].move();
}
for (var i = 0; i < enemies.length; i++) {
enemies[i].move();
}
for (var i = 0; i < heroBullets.length; i++) {
heroBullets[i].move();
}
for (var i = 0; i < enemyBullets.length; i++) {
enemyBullets[i].move();
}
});
self.on('down', function (obj) {
var pos = obj.event.getLocalPosition(self);
});
});
A pixel art sprite in a Super Nintendo, Super Castlevania style where it looks a little gothic/vampire hunter like Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A pixel art large background in a Super Nintendo, Super Castlevania style with an open world like cemetery, 3/4 viewpoint Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. A pixel art sprite in a Super Nintendo, Super Castlevania style that looks like a small pile of bones
Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. A pixel art sprite in a Super Nintendo, Super Castlevania style that looks like a skeleton zombie that is haunched over
Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Pixel art in a SNES style that looks like something from castlevania. A ground explosion effect like something is coming out of the ground
Pixel art in SNES Castlevania style. Red goblin Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Pixel art in SNES Castlevania style. Red goblin