User prompt
make the screen egg-white
User prompt
Make the screen b64f2c color
User prompt
Make the screen off-white
User prompt
Make the screen white and the chicken text black
User prompt
Change the text 'Score: 0' to 'Chicken'.
User prompt
delete the enemy class
User prompt
Delete the bullet class
User prompt
delete the dots
Initial prompt
Chicken
/****
* Classes
****/
//<Assets used in the game will automatically appear here>
// Chicken class
var Chicken = Container.expand(function () {
var self = Container.call(this);
var chickenGraphics = self.attachAsset('chicken', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 5;
self.update = function () {
// Update logic for chicken
};
self.move = function (x, y) {
self.x = x;
self.y = y;
};
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xF0EAD6 //Init game with egg-white background
});
/****
* Game Code
****/
// Initialize variables
var chicken;
var score = 0;
var scoreTxt;
// Initialize game elements
function initGame() {
chicken = game.addChild(new Chicken());
chicken.x = 2048 / 2;
chicken.y = 2732 - 200;
scoreTxt = new Text2('Chicken', {
size: 100,
fill: "#000000"
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
}
// Update game elements
game.update = function () {
chicken.update();
};
// Handle touch events
game.down = function (x, y, obj) {
chicken.move(x, y);
};
game.move = function (x, y, obj) {
chicken.move(x, y);
};
game.up = function (x, y, obj) {
// No action needed on touch up
};
// Initialize the game
initGame(); ===================================================================
--- original.js
+++ change.js
@@ -22,9 +22,9 @@
/****
* Initialize Game
****/
var game = new LK.Game({
- backgroundColor: 0xb64f2c //Init game with b64f2c background
+ backgroundColor: 0xF0EAD6 //Init game with egg-white background
});
/****
* Game Code