var Bell = Container.expand(function () {
var self = Container.call(this);
var bellGraphics = self.createAsset('bell', 'Christmas Bell', .5, .5);
self.move = function () {};
self.hit = function () {};
});
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.createAsset('player', 'Player Character', .5, .5);
self.jump = function () {};
self.fall = function () {};
});
var Game = Container.expand(function () {
var self = Container.call(this);
var player;
var bells = [];
var scoreTxt;
var isGameOver = false;
function setup() {
player = self.addChild(new Player());
player.x = 2048 / 2;
player.y = 2732 - player.height;
scoreTxt = new Text2('0', {
size: 150,
fill: "#ffffff"
});
scoreTxt.anchor.set(.5, 0);
LK.gui.topCenter.addChild(scoreTxt);
for (var i = 0; i < 10; i++) {
var bell = self.addChild(new Bell());
bell.x = Math.random() * (2048 - bell.width);
bell.y = Math.random() * (2732 - bell.height);
bells.push(bell);
}
}
LK.on('tick', function () {
player.update();
for (var i = 0; i < bells.length; i++) {
bells[i].move();
}
if (player.y > 2732) {
isGameOver = true;
}
if (isGameOver) {
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
}
});
setup();
});
Tree line of snowy pine trees. Cartoon. Black background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Mountain valley with snowy trees. Scenic view. Nighttime. Cartoon. Black background. New moon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Background mountains, nighttime, snow topped Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d platform snowy ground. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cute cartoon rabbit, jumping upwards facing camera. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Starry night sky, northern lights, looking up. Cartoon style. Above clouds Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Single White Christmas bell. White decorations. Cartoon. Outline Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
White Simple Cartoon snowflake Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.