===================================================================
--- original.js
+++ change.js
@@ -16,8 +16,20 @@
anchorY: 0.5,
x: 1024,
y: 1366
});
+// Initialize a counter on the top center called code
+var codeCounter = new Text2('0', {
+ size: 150,
+ fill: 0xFFFFFF
+});
+codeCounter.anchor.set(0.5, 0);
+LK.gui.top.addChild(codeCounter);
+// Increase the counter by 4 points every game tick
+game.update = function () {
+ var currentScore = parseInt(codeCounter.text);
+ codeCounter.setText(currentScore + 4);
+};
var coder = game.attachAsset('coder', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
a developer sitting on his laptop in his cubicle, typing on the keyboard. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
coffee mug. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
coffee cup 8 bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows