User prompt
scale bee 2
User prompt
all 8 flowertypes should be in the asset section from start
User prompt
flower can have one of 8 different graphics
Code edit (1 edits merged)
Please save this source code
User prompt
the lowest flower should be directly above player on x axis
User prompt
flower rotation speed max should be defined in game
User prompt
flowers should rotate randomly either clockwise or counter clockwise
User prompt
flowers should rotate in place at a slow pace
User prompt
make flower x positions different
User prompt
spawn three flowers on screen at different y positions
User prompt
Fix Bug: 'Uncaught ReferenceError: beeGraphics is not defined' in this line: 'bee.y = 2732 - beeGraphics.height / 2;' Line Number: 30
User prompt
place bee at bottom of screen
User prompt
Fix Bug: 'TypeError: bee.update is not a function' in this line: 'bee.update();' Line Number: 31
User prompt
Fix Bug: 'TypeError: bee.update is not a function' in this line: 'bee.update();' Line Number: 31
Initial prompt
Flowers & Bee
var Bee = Container.expand(function () { var self = Container.call(this); var beeGraphics = self.createAsset('bee', 'Bee character', .5, .5); self.speed = 5; self.jump = function () {}; self.collectNectar = function () {}; }); var Flower = Container.expand(function () { var self = Container.call(this); var flowerGraphics = self.createAsset('flower', 'Flower', .5, .5); self.produceNectar = function () {}; }); var Nectar = Container.expand(function () { var self = Container.call(this); var nectarGraphics = self.createAsset('nectar', 'Nectar', .5, .5); }); var Game = Container.expand(function () { var self = Container.call(this); var bee = self.addChild(new Bee()); var flowers = []; var nectars = []; var scoreTxt = new Text2('0', { size: 150, fill: "#ffffff" }); LK.gui.topCenter.addChild(scoreTxt); var isGameOver = false; bee.x = 1024; bee.y = 1366; LK.on('tick', function () { bee.update(); if (isGameOver) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } for (var i = 0; i < flowers.length; i++) { flowers[i].produceNectar(); } for (var j = 0; j < nectars.length; j++) { if (bee.intersects(nectars[j])) { bee.collectNectar(); nectars[j].destroy(); nectars.splice(j, 1); } } }); stage.on('down', function (obj) { var event = obj.event; var pos = event.getLocalPosition(self); if (bee.intersects(pos)) { bee.jump(); } }); });
var Bee = Container.expand(function () {
var self = Container.call(this);
var beeGraphics = self.createAsset('bee', 'Bee character', .5, .5);
self.speed = 5;
self.jump = function () {};
self.collectNectar = function () {};
});
var Flower = Container.expand(function () {
var self = Container.call(this);
var flowerGraphics = self.createAsset('flower', 'Flower', .5, .5);
self.produceNectar = function () {};
});
var Nectar = Container.expand(function () {
var self = Container.call(this);
var nectarGraphics = self.createAsset('nectar', 'Nectar', .5, .5);
});
var Game = Container.expand(function () {
var self = Container.call(this);
var bee = self.addChild(new Bee());
var flowers = [];
var nectars = [];
var scoreTxt = new Text2('0', {
size: 150,
fill: "#ffffff"
});
LK.gui.topCenter.addChild(scoreTxt);
var isGameOver = false;
bee.x = 1024;
bee.y = 1366;
LK.on('tick', function () {
bee.update();
if (isGameOver) {
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
}
for (var i = 0; i < flowers.length; i++) {
flowers[i].produceNectar();
}
for (var j = 0; j < nectars.length; j++) {
if (bee.intersects(nectars[j])) {
bee.collectNectar();
nectars[j].destroy();
nectars.splice(j, 1);
}
}
});
stage.on('down', function (obj) {
var event = obj.event;
var pos = event.getLocalPosition(self);
if (bee.intersects(pos)) {
bee.jump();
}
});
});
A large red round flower. Top down view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A large blue round flower. Top down view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A round yellow flower. Top down view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A round purple and red flower. Top down view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A round green and yellow flower. Top down view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A round orange and white flower. Top down view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A round cyan and blue flower. Top down view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A round magenta and green flower. Top down view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A happy little bee. Top down view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a lush meadow full of tiny flowers. top-down view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
yellow pointy star twinkle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.