/**** * Classes ****/ // Carrom Board Class var CarromBoard = Container.expand(function () { var self = Container.call(this); var boardGraphics = self.attachAsset('carromBoard', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2; self.y = 2732 / 2; }); // Chess Board Class var ChessBoard = Container.expand(function () { var self = Container.call(this); var boardGraphics = self.attachAsset('chessBoard', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2; self.y = 2732 / 2; }); //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> // Ludo Board Class var LudoBoard = Container.expand(function () { var self = Container.call(this); var boardGraphics = self.attachAsset('ludoBoard', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2; self.y = 2732 / 2; }); // Pushing Ball Class var PushingBall = Container.expand(function () { var self = Container.call(this); var ballGraphics = self.attachAsset('pushingBall', { anchorX: 0.5, anchorY: 0.5 }); self.x = 2048 / 2; self.y = 2732 / 2; self.update = function () { // Ball movement logic }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ // Initialize game elements var ludoBoard = game.addChild(new LudoBoard()); var chessBoard = game.addChild(new ChessBoard()); var pushingBall = game.addChild(new PushingBall()); var carromBoard = game.addChild(new CarromBoard()); // Game logic game.update = function () { // Update game elements pushingBall.update(); }; // Event listeners game.down = function (x, y, obj) { // Handle touch down events }; game.up = function (x, y, obj) { // Handle touch up events }; game.move = function (x, y, obj) { // Handle touch move events };
/****
* Classes
****/
// Carrom Board Class
var CarromBoard = Container.expand(function () {
var self = Container.call(this);
var boardGraphics = self.attachAsset('carromBoard', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = 2048 / 2;
self.y = 2732 / 2;
});
// Chess Board Class
var ChessBoard = Container.expand(function () {
var self = Container.call(this);
var boardGraphics = self.attachAsset('chessBoard', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = 2048 / 2;
self.y = 2732 / 2;
});
//<Assets used in the game will automatically appear here>
//<Write imports for supported plugins here>
// Ludo Board Class
var LudoBoard = Container.expand(function () {
var self = Container.call(this);
var boardGraphics = self.attachAsset('ludoBoard', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = 2048 / 2;
self.y = 2732 / 2;
});
// Pushing Ball Class
var PushingBall = Container.expand(function () {
var self = Container.call(this);
var ballGraphics = self.attachAsset('pushingBall', {
anchorX: 0.5,
anchorY: 0.5
});
self.x = 2048 / 2;
self.y = 2732 / 2;
self.update = function () {
// Ball movement logic
};
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000 //Init game with black background
});
/****
* Game Code
****/
// Initialize game elements
var ludoBoard = game.addChild(new LudoBoard());
var chessBoard = game.addChild(new ChessBoard());
var pushingBall = game.addChild(new PushingBall());
var carromBoard = game.addChild(new CarromBoard());
// Game logic
game.update = function () {
// Update game elements
pushingBall.update();
};
// Event listeners
game.down = function (x, y, obj) {
// Handle touch down events
};
game.up = function (x, y, obj) {
// Handle touch up events
};
game.move = function (x, y, obj) {
// Handle touch move events
};
like a carrom. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
like a chess and impressive. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
ludo like. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pushing ball like. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.