/**** * Classes ****/ // House class representing upgradeable houses var House = Container.expand(function () { var self = Container.call(this); var houseGraphics = self.attachAsset('house', { anchorX: 0.5, anchorY: 0.5 }); self.upgrade = function (resource) { // Logic for upgrading house with a resource }; }); /**** * Initialize Game ****/ //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ // Initialize arrays and variables var resources = []; var houses = []; var score = 0; // Function to create houses function createHouse(x, y) { var house = new House(); house.x = 2048 - house.width / 2; // Position the house to the right edge of the screen house.y = 2732 - house.height / 2; // Position the house to the bottom edge of the screen houses.push(house); game.addChild(house); } createHouse(1000, 1000); var wall = LK.getAsset('wall1', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 200 }); game.addChild(wall); game.down = function (x, y, obj) {}; game.up = function (x, y, obj) {}; // Update game logic game.update = function () { houses.forEach(function (house) { // Logic for house updates }); };
===================================================================
--- original.js
+++ change.js
@@ -41,9 +41,9 @@
var wall = LK.getAsset('wall1', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
- y: 50
+ y: 200
});
game.addChild(wall);
game.down = function (x, y, obj) {};
game.up = function (x, y, obj) {};
2D wreckage of wood, square, HD colors. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
House from the front facing the screen with big sign above it have description "SHOP", Hd colors
coin, have "AD" not "$", hd colors. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows