/****
* Classes
****/
//<Assets used in the game will automatically appear here>
//<Write imports for supported plugins here>
// Clickable object class
var ClickableObject = Container.expand(function () {
var self = Container.call(this);
var objectGraphics = self.attachAsset('clickable', {
anchorX: 0.5,
anchorY: 0.5
});
self.onClick = function () {
// Increase score when clicked
LK.setScore(LK.getScore() + 1);
scoreTxt.setText(LK.getScore());
};
self.down = function (x, y, obj) {
self.onClick();
};
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000 //Init game with black background
});
/****
* Game Code
****/
// Initialize score text
var scoreTxt = new Text2('0', {
size: 150,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
// Create clickable object
var clickableObject = new ClickableObject();
clickableObject.x = 2048 / 2 - 100; // Move the object 100 pixels to the left
clickableObject.y = 2732 / 2;
game.addChild(clickableObject);
// Update function
game.update = function () {
// Game logic updates
}; ===================================================================
--- original.js
+++ change.js
@@ -1,48 +1,48 @@
-/****
+/****
* Classes
-****/
+****/
//<Assets used in the game will automatically appear here>
//<Write imports for supported plugins here>
// Clickable object class
var ClickableObject = Container.expand(function () {
- var self = Container.call(this);
- var objectGraphics = self.attachAsset('clickable', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.onClick = function () {
- // Increase score when clicked
- LK.setScore(LK.getScore() + 1);
- scoreTxt.setText(LK.getScore());
- };
- self.down = function (x, y, obj) {
- self.onClick();
- };
+ var self = Container.call(this);
+ var objectGraphics = self.attachAsset('clickable', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.onClick = function () {
+ // Increase score when clicked
+ LK.setScore(LK.getScore() + 1);
+ scoreTxt.setText(LK.getScore());
+ };
+ self.down = function (x, y, obj) {
+ self.onClick();
+ };
});
-/****
+/****
* Initialize Game
-****/
+****/
var game = new LK.Game({
- backgroundColor: 0x000000 //Init game with black background
+ backgroundColor: 0x000000 //Init game with black background
});
-/****
+/****
* Game Code
-****/
+****/
// Initialize score text
var scoreTxt = new Text2('0', {
- size: 150,
- fill: 0xFFFFFF
+ size: 150,
+ fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
// Create clickable object
var clickableObject = new ClickableObject();
-clickableObject.x = 2048 / 2;
+clickableObject.x = 2048 / 2 - 100; // Move the object 100 pixels to the left
clickableObject.y = 2732 / 2;
game.addChild(clickableObject);
// Update function
game.update = function () {
- // Game logic updates
+ // Game logic updates
};
\ No newline at end of file
pixel candy noel. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel under tale text= ı need 100Candy
pixel text Sold
pixel text :Auto click
pixel text tablo : I need 400Candy. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel şekerli mavi tonlarında hafif karanlık tema lı arka plan. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel kar tanesi
pixel Ses açma kapama butonu
Pixel 2d Noel Baba Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
sade olsun Text pixel : Ineed 1000Candy