var Coconut = Container.expand(function () {
var self = Container.call(this);
var coconutGraphics = self.createAsset('coconut', 'Coconut Graphics', .5, .5);
self.speed = 5;
self.move = function () {
self.y += self.speed;
};
});
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.createAsset('player', 'Player Graphics', .5, .5);
self.move = function (x, y) {
self.x = x;
self.y = y;
};
});
var Game = Container.expand(function () {
var self = Container.call(this);
LK.stageContainer.setBackgroundColor(0x008080);
var player = self.addChild(new Player());
player.x = 2048 / 2;
player.y = 2732 - 200;
var coconuts = [];
stage.on('down', function (obj) {
var event = obj.event;
var pos = event.getLocalPosition(self);
player.move(pos.x, pos.y);
});
stage.on('move', function (obj) {
var event = obj.event;
var pos = event.getLocalPosition(self);
player.move(pos.x, pos.y);
});
LK.on('tick', function () {
for (var a = coconuts.length; a >= 0; a--) {
coconuts[a].move();
if (coconuts[a].y > 2732) {
coconuts[a].destroy();
coconuts.splice(a, 1);
}
}
if (LK.ticks % 60 == 0) {
var newCoconut = new Coconut();
newCoconut.x = Math.random() * 2048;
newCoconut.y = 0;
coconuts.push(newCoconut);
self.addChild(newCoconut);
}
for (var b = 0; b < coconuts.length; b++) {
if (player.intersects(coconuts[b])) {
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
}
}
});
});
8-bit. Cartoon. Guy the beach. Full body. Looking up. Sunglasses. Worried. In game asset. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
delete inpain selection
pixelart cartoon beach schene. just the beach and a big palm tree. no background.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixelart cartoon beach background for a mobile screen.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.