===================================================================
--- original.js
+++ change.js
@@ -87,21 +87,39 @@
x: 1024,
y: 2732 / 2
});
var goText = new Text2('', {
- size: 50,
+ size: 85,
fill: "#ffffff",
stroke: '#000000',
strokeThickness: 10,
weight: 300,
align: 'left'
});
- var text = 'Congratulations!\nYou worked hard and finally get to enjoy summer.\You served XX drinks\You made XX $\n';
- text += 'Over XX days\n\nYour final score is XX\n\n(Click anywhere to submit your score and end the game)';
+ var finalScore = totalEarned * 2 + drinksServed * 3 + daysSpent * 10;
+ var text = 'Congratulations!\n- You worked hard and finally get to enjoy summer!\n';
+ text += '- You served ' + drinksServed + ' drinks and lemonades\n';
+ text += '- You made ' + totalEarned + ' $';
+ text += ' in ' + daysSpent + ' days\n\nYour final score is ' + finalScore + '\n\n';
goText.setText(text);
- goText.x = 10;
+ goText.x = 20;
goText.y = 500;
self.addChild(goText);
+ var endText = new Text2('(Click anywhere to submit your score and end the game.)', {
+ size: 65,
+ fill: "#ffffff",
+ stroke: '#000000',
+ strokeThickness: 10,
+ weight: 300,
+ align: 'left'
+ });
+ endText.x = 20;
+ endText.y = 1250;
+ self.addChild(endText);
+ self.on('down', function () {
+ LK.setScore(finalScore);
+ LK.showGameOver();
+ });
});
// Girl class
var Girl = Container.expand(function () {
var self = Container.call(this);
@@ -127,8 +145,9 @@
anchorY: 0.5
});
self.vx = 0;
self.vy = 0;
+ self.scale.x = self.scale.y = 0.8 + Math.random() * 0.7;
self.lifetime = 0;
self.delay = 0;
self.update = function () {
if (self.delay-- <= 0) {
@@ -540,11 +559,12 @@
//availableItems.push(watermelonDrink);
// TODO: Finally bought the yacht.
var gob = new GameOverBackground();
game.addChild(gob);
+ scoreTxt.destroy();
}
};
- var shopTxt = new Text2('Time to shop for new recipies', {
+ var shopTxt = new Text2('Time to shop for new recipes', {
size: 80,
fill: "#ffffff",
stroke: "#2B1700",
strokeThickness: 10,
@@ -634,8 +654,10 @@
/****
* Game Code
****/
+var drinksServed = 0;
+var daysSpent = 0;
var instructionTxt;
function updateCoinsText() {
coinsTxt.setText('Star Coins: ' + coins);
}
@@ -765,8 +787,9 @@
}));
var dailyCustomerAmount = 7;
addCustomers(dailyCustomerAmount);
function addCustomers(amount) {
+ daysSpent++;
for (var i = 0; i < amount; i++) {
//var t = new customerTypes[Math.floor(Math.random() * customerTypes.length)]();
var t = new CustomerBase();
t.y = 1800;
@@ -982,9 +1005,8 @@
return points;
}
;
var totalEarned = 0;
-var coins = 1000;
var emptyGlass;
//var harvestedCounter = 0;
var queueSpeed = 3;
var queueUpdateCounter = 0;
@@ -1020,11 +1042,8 @@
}
;
var shop = new ShopWindow();
game.addChild(shop);
-//game.addChild(shop);
-var go = new GameOverBackground();
-game.addChild(go);
game.update = function () {
updateCustomers();
//itemSprite.update();
};
@@ -1065,8 +1084,9 @@
sprite.update = null;
//createHeartExplosion(targetX, targetY - 100);
showMoneyEarned(targetX, targetY - 100, currentOrder.price);
customers[0].happy = true;
+ drinksServed++;
var customerDrink = LK.getAsset(currentOrder.sprite, {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.3,
A beautiful scenery looking out to sea from an empty beach side promenade on a bright summer day. Happy game illustration style for a casual family friendly game.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
remove the glass and the crate of lemons from the table.
A simple, elegant white speech bubble.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A lemon with a few slices cut off.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A bag of white sugar, open and with a pile of the sugar in front of it.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A pitcher full of nice fresh water and ice cubes.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A round white button for an interface element.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An empty drinking glass.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A yellow star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A red heart. simple.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A nice glass of watermelon and strawberry slushice. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A nice glass of banana milkshake. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A nice glass of pina colada. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A nice glass of mango lassie. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An orange. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A couple of blueberries. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A couple of bananas. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A bottle of milk. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A watermelon and some pieces of watermelon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A mango and a few slices of mango. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A pineapple with a few slices of pineapple in front. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A fullscreen background gui element for an in-game shop. It should be mostly blanks space, but along the edges there could be some structure or decorative vines and items, mostly related to fruits, berries, cocktails in a summer theme.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A modern dream of a sailing boat. game illustration.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A bold green checkmark.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An idyllic llustration of a beach cove where a blnd girl in a strawhat i en joying an enormous strawberry drink on her sailing boat as the sun sets. Clean game art illustration style.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
An idyllic llustration of a beach cove where a blond girl in a straw hat is enjoying an large strawberry drink on the deck of her sailing boat as the sun sets. Clean game illustration style.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.