/**** * Classes ****/ var Enemy = Container.expand(function () { var self = Container.call(this); var enemyGraphics = self.attachAsset('asianGirl', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Enemy update logic here }; }); var Hero = Container.expand(function () { var self = Container.call(this); var heroGraphics = self.attachAsset('norwegianGirl', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Hero update logic here }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ var leftWall = game.addChild(LK.getAsset('leftWall', { x: 0, y: 1366 })); var rightWall = game.addChild(LK.getAsset('rightWall', { x: 2038, y: 1366 })); var tapCounter = 0; var hero = game.addChild(new Hero()); hero.x = 1024; // Position at the center hero.y = 1366; // Center vertically var enemy = game.addChild(new Enemy()); enemy.x = 1024; // Position at the center enemy.y = 1366; // Center vertically LK.on('tick', function () { // AI control if (LK.ticks % Math.floor(Math.random() * 3.2) === 0) { // The hero is stronger and moves in bursts hero.x += Math.random() * (10 + tapCounter * 0.04); // The enemy is equal in strength but moves in strong bursts enemy.x -= Math.random() * (10 + tapCounter * 0.04); } hero.update(); enemy.update(); // Collision detection and response if (hero.intersects(enemy)) { var overlap = hero.x + hero.width - enemy.x; hero.x -= overlap / 20; enemy.x += overlap / 20; if (hero.x > enemy.x) { hero.zIndex = 1; enemy.zIndex = 0; } else { hero.zIndex = 0; enemy.zIndex = 1; } } if (hero.intersects(leftWall) || enemy.intersects(rightWall)) { LK.showGameOver(); } });
/****
* Classes
****/
var Enemy = Container.expand(function () {
var self = Container.call(this);
var enemyGraphics = self.attachAsset('asianGirl', {
anchorX: 0.5,
anchorY: 0.5
});
self.update = function () {
// Enemy update logic here
};
});
var Hero = Container.expand(function () {
var self = Container.call(this);
var heroGraphics = self.attachAsset('norwegianGirl', {
anchorX: 0.5,
anchorY: 0.5
});
self.update = function () {
// Hero update logic here
};
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000 //Init game with black background
});
/****
* Game Code
****/
var leftWall = game.addChild(LK.getAsset('leftWall', {
x: 0,
y: 1366
}));
var rightWall = game.addChild(LK.getAsset('rightWall', {
x: 2038,
y: 1366
}));
var tapCounter = 0;
var hero = game.addChild(new Hero());
hero.x = 1024; // Position at the center
hero.y = 1366; // Center vertically
var enemy = game.addChild(new Enemy());
enemy.x = 1024; // Position at the center
enemy.y = 1366; // Center vertically
LK.on('tick', function () {
// AI control
if (LK.ticks % Math.floor(Math.random() * 3.2) === 0) {
// The hero is stronger and moves in bursts
hero.x += Math.random() * (10 + tapCounter * 0.04);
// The enemy is equal in strength but moves in strong bursts
enemy.x -= Math.random() * (10 + tapCounter * 0.04);
}
hero.update();
enemy.update();
// Collision detection and response
if (hero.intersects(enemy)) {
var overlap = hero.x + hero.width - enemy.x;
hero.x -= overlap / 20;
enemy.x += overlap / 20;
if (hero.x > enemy.x) {
hero.zIndex = 1;
enemy.zIndex = 0;
} else {
hero.zIndex = 0;
enemy.zIndex = 1;
}
}
if (hero.intersects(leftWall) || enemy.intersects(rightWall)) {
LK.showGameOver();
}
});
Душат друг друга за шею. Beautiful angry girls female lady. Ужас и боль. Спортивные кофты с контрастными вставками. Захват за шею . Две девушки брюнетка против блондинки. Одетые в блестящие сатиновые спортивные костюмы красный против голубого. Боль страх отчаяние в глазах. Дерутся кулаками и ногами, Cartoon oldschool comics. Grabs Collarfight collarshake collargrappled in tracksuit satin track jacket. Girls blonde vs brunette. Cartoon comics oldshcool retro. Red satin tracksuit adidas track jacket asian brunette young women. Blue satin tracksuit kappa track jacket blone scandinavian young women beauty. Grabs collar each other. Beautiful girls. Fight kick hit strike to head. Хитпоинты урон. Наносят удары урон, драка. Душат друг друга за шею. Beautiful angry girls female lady. . Cartoon oldschool comics. Grabs Collarfight collarshake collargrappled in tracksuit satin track jacket. Girls blonde vs brunette. Cartoon comics oldshcool retro. Red satin tracksuit adidas track jacket asian brunette young women. Blue satin tracksuit kappa track jacket blone scandinavian young women beauty. Grabs collar each other. Beautiful girls. Beautiful girls female lady. Cartoon oldschool comics. Grabs Collarfight collarshake collargrappled in tracksuit satin track jacket. Girls blonde vs brunette. Cartoon comics oldshcool retro. Red satin tracksuit adidas track jacket asian brunette young women. Cartoon comics oldshcool retro. Red satin tracksuit adidas track jacket asian brunette young women. Blue satin tracksuit kappa track jacket blone scandinavian young women beauty. Grabs collar each other. Beautiful girls. Beautiful girls female lady. Захват за шею . Cartoon oldschool comics. Grabs Collarfight collarshake collargrappled in tracksuit satin track jacket. Girls blonde vs brunette. Cartoon comics oldshcool retro. Red satin tracksuit adidas track jacket asian brunette young women. Blue satin tracksuit kappa track jacket blone scandinavian young women beauty. Grabs collar each other. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.