User prompt
Mas margen
User prompt
Pon la imagen de las monedas delante del numero dejando algo de margen
User prompt
Dame 1200 monedas para testear
User prompt
Pero una imagen nueva para yo cambiarla desde assets
User prompt
Haz que la imagen del aspersor sea otra para poder cambiarla
User prompt
Vamos a añadir un nuevo upgrade que sea un aspersor que al comprarlo se ponga en medio de todas las plots y acelere el crecimiento de todo 30 segundos ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Que las letras de Heaven farm tengan otra fuente mas gruesa y de color blanco
User prompt
No se ve la animación arteglalo ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Haz una animación para toca para comenzar ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Haz que el Toca para comenzar se agrande y se achique para dar un efecto de movimiento ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Pon que en vez de granja virtual ponga Haven Farm
User prompt
Vamos a añadir una pantalla de inicio que al presionar sobre ella te lleve al juego donde lo dejamos
User prompt
Redondeale las esquinas al cuadrado
User prompt
Ahora bajale un poco la opacidad
User prompt
Quitale la opacidad y dejalo gris
User prompt
Bajale la opacidad para que se vea mas negro
User prompt
El cuadrado de la hora y la estacion hazlo mas oscuro
User prompt
Mas oscuro
User prompt
Hazlo un poco mas oscuro
User prompt
Un poco mas
User prompt
Un poco mas a la izquierda
User prompt
Un poco mas largo y hacia la izquierda
User prompt
Un cuadrado detras de la hora y las estaciones con poca opacidad centrado
User prompt
Haz que los minutos pasen como cada 3 segundos
User prompt
Mas grandes las letras y dejando margen entre lineas
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var BuyPanel = Container.expand(function () {
var self = Container.call(this);
// Create rounded horizontal background
var panelBg = LK.getAsset('shopPanel', {
anchorX: 0.5,
anchorY: 0.5
});
// Make corners rounded by scaling height and applying visual rounding effect
panelBg.scale.set(1.5, 0.6); // Make it wider and more horizontal like inventory panel
self.addChild(panelBg);
var titleText = new Text2('COMPRAR SEMILLAS', {
size: 50,
fill: 0x000000
});
titleText.anchor.set(0.5, 0.5);
titleText.x = 0;
titleText.y = -200;
self.addChild(titleText);
var closeBtn = self.addChild(LK.getAsset('closeButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 800,
y: -250
}));
var closeBtnText = new Text2('X', {
size: 30,
fill: 0xFFFFFF
});
closeBtnText.anchor.set(0.5, 0.5);
closeBtn.addChild(closeBtnText);
// Switch to sell panel button
var sellPanelBtn = self.addChild(LK.getAsset('sellButton', {
anchorX: 0.5,
anchorY: 0.5,
x: -700,
y: 200
}));
var sellPanelBtnText = new Text2('VENDER', {
size: 30,
fill: 0xFFFFFF
});
sellPanelBtnText.anchor.set(0.5, 0.5);
sellPanelBtn.addChild(sellPanelBtnText);
// Seed shop items
var seedItems = [{
name: 'Semillas de Lechuga',
type: 'crop1',
price: 5
}, {
name: 'Semillas de Tomate',
type: 'crop2',
price: 10
}, {
name: 'Semillas de Maíz',
type: 'crop3',
price: 20
}];
var buyItems = [];
seedItems.forEach(function (item, index) {
var row = Math.floor(index / 4);
var col = index % 4;
var shopItem = new ShopItem(item.type, item.price, false);
shopItem.x = -400 + col * 400;
shopItem.y = 80 + row * 200;
self.addChild(shopItem);
buyItems.push(shopItem);
shopItem.button.down = function (x, y, obj) {
if (coins >= item.price) {
coins -= item.price;
if (!seeds[item.type]) {
seeds[item.type] = 0;
}
seeds[item.type] += 5;
// Award XP for buying seeds (1 XP per purchase)
addXP(1);
LK.getSound('purchase').play();
updateUI();
}
};
});
sellPanelBtn.down = function (x, y, obj) {
self.visible = false;
sellPanel.visible = true;
sellPanel.updateSellSection();
};
closeBtn.down = function (x, y, obj) {
self.visible = false;
isBuyPanelOpen = false;
};
return self;
});
var FarmPlot = Container.expand(function () {
var self = Container.call(this);
var plotGraphics = self.attachAsset('farmPlot', {
anchorX: 0.5,
anchorY: 0.5
});
self.cropType = null;
self.plantTime = 0;
self.growthStage = 0;
self.currentCrop = null;
self.isEmpty = true;
self.isReady = false;
self.plantCrop = function (cropType) {
if (!self.isEmpty) return false;
self.cropType = cropType;
self.plantTime = LK.ticks;
self.growthStage = 0;
self.isEmpty = false;
self.isReady = false;
// Create seedling
self.currentCrop = self.addChild(LK.getAsset('seedling', {
anchorX: 0.5,
anchorY: 0.5,
y: -20
}));
LK.getSound('plant').play();
// Award XP for planting (1 XP per plant)
addXP(1);
return true;
};
self.harvestCrop = function () {
if (!self.isReady) return null;
var harvestedCrop = {
type: self.cropType,
value: cropData[self.cropType].value
};
// Remove crop visual
if (self.currentCrop) {
self.currentCrop.destroy();
self.currentCrop = null;
}
// Reset plot
self.cropType = null;
self.plantTime = 0;
self.growthStage = 0;
self.isEmpty = true;
self.isReady = false;
LK.getSound('harvest').play();
// Award XP for harvesting (5 XP per harvest)
addXP(5);
return harvestedCrop;
};
self.update = function () {
if (self.isEmpty || !self.cropType) return;
var elapsed = LK.ticks - self.plantTime;
var growthTime = cropData[self.cropType].growthTime;
if (elapsed >= growthTime && !self.isReady) {
// Crop is ready
self.isReady = true;
if (self.currentCrop) {
self.currentCrop.destroy();
}
self.currentCrop = self.addChild(LK.getAsset(self.cropType, {
anchorX: 0.5,
anchorY: 0.5,
y: -20
}));
// Add glow effect for ready crops
tween(self.currentCrop, {
alpha: 0.7
}, {
duration: 500,
easing: tween.easeInOut
});
tween(self.currentCrop, {
alpha: 1.0
}, {
duration: 500,
easing: tween.easeInOut,
onFinish: function onFinish() {
if (self.currentCrop && self.isReady) {
tween(self.currentCrop, {
alpha: 0.7
}, {
duration: 500,
easing: tween.easeInOut
});
tween(self.currentCrop, {
alpha: 1.0
}, {
duration: 500,
easing: tween.easeInOut,
onFinish: function onFinish() {
if (self.currentCrop && self.isReady) {
self.update();
}
}
});
}
}
});
} else if (elapsed < growthTime && elapsed > growthTime * 0.5 && self.growthStage === 0) {
// Half grown
self.growthStage = 1;
if (self.currentCrop) {
tween(self.currentCrop, {
scaleX: 1.2,
scaleY: 1.2
}, {
duration: 300
});
}
}
};
self.down = function (x, y, obj) {
if (self.isReady) {
var harvest = self.harvestCrop();
if (harvest) {
// Add to inventory
if (!inventory[harvest.type]) {
inventory[harvest.type] = 0;
}
inventory[harvest.type]++;
updateUI();
}
} else if (self.isEmpty && selectedSeed && seeds[selectedSeed] > 0) {
if (self.plantCrop(selectedSeed)) {
seeds[selectedSeed]--;
updateUI();
}
}
};
return self;
});
var HotbarSlot = Container.expand(function (seedType, index) {
var self = Container.call(this);
self.seedType = seedType;
self.index = index;
self.isSelected = false;
var slotBg = self.attachAsset('hotbarSlot', {
anchorX: 0.5,
anchorY: 0.5
});
self.selectedBg = self.addChild(LK.getAsset('hotbarSlotSelected', {
anchorX: 0.5,
anchorY: 0.5
}));
self.selectedBg.visible = false;
// Add seed visual
if (seedType) {
var seedVisual = self.addChild(LK.getAsset(seedType, {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.8,
scaleY: 0.8
}));
}
// Add count text
self.countText = new Text2('0', {
size: 30,
fill: 0xFFFFFF
});
self.countText.anchor.set(0.5, 0.5);
self.countText.x = 0;
self.countText.y = 40;
self.addChild(self.countText);
self.updateCount = function (count) {
self.countText.setText(count.toString());
self.alpha = count > 0 ? 1.0 : 0.5;
};
self.setSelected = function (selected) {
self.isSelected = selected;
self.selectedBg.visible = selected;
if (selected) {
tween(self, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 200,
easing: tween.easeInOut
});
} else {
tween(self, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 200,
easing: tween.easeInOut
});
}
};
self.down = function (x, y, obj) {
if (seeds[self.seedType] > 0) {
selectedSeed = self.seedType;
updateHotbar();
}
};
return self;
});
var InventoryItem = Container.expand(function (itemType, count, isHarvested) {
var self = Container.call(this);
// Item icon without background frame - larger size
var itemIcon = self.addChild(LK.getAsset(itemType, {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 1.5,
scaleY: 1.5
}));
// Item name below the image - larger text
var itemName = new Text2(cropData[itemType] ? cropData[itemType].name : itemType, {
size: 45,
fill: 0x000000
});
itemName.anchor.set(0.5, 0.5);
itemName.x = 0;
itemName.y = 80; // Position below the item image
self.addChild(itemName);
// Count text - larger size
self.countText = new Text2(count.toString(), {
size: 40,
fill: 0x000000
});
self.countText.anchor.set(0.5, 0.5);
self.countText.x = 0;
self.countText.y = 120; // Position below the item name
self.addChild(self.countText);
self.updateCount = function (newCount) {
self.countText.setText(newCount.toString());
self.alpha = newCount > 0 ? 1.0 : 0.5;
};
return self;
});
var InventoryPanel = Container.expand(function () {
var self = Container.call(this);
// Create rounded horizontal background
var panelBg = LK.getAsset('shopPanel', {
anchorX: 0.5,
anchorY: 0.5
});
// Make corners rounded by scaling height and applying visual rounding effect
panelBg.scale.set(1.5, 0.6); // Make it wider and more horizontal like shop and upgrades panels
self.addChild(panelBg);
var titleText = new Text2('INVENTARIO', {
size: 50,
fill: 0x000000
});
titleText.anchor.set(0.5, 0.5);
titleText.x = 0;
titleText.y = -200;
self.addChild(titleText);
var closeBtn = self.addChild(LK.getAsset('closeButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 800,
y: -250
}));
var closeBtnText = new Text2('X', {
size: 30,
fill: 0xFFFFFF
});
closeBtnText.anchor.set(0.5, 0.5);
closeBtn.addChild(closeBtnText);
self.inventoryTexts = [];
self.updateInventory = function () {
// Clear existing items
self.inventoryTexts.forEach(function (item) {
item.destroy();
});
self.inventoryTexts = [];
// Create grid layout - wider spacing for larger items
var itemsPerRow = 4;
var itemSpacing = 220;
var currentRow = 0;
var currentCol = 0;
// Adjust positioning for horizontal layout with proper margins within background
var startX = -400; // Adjust left margin to stay within background
var startY = 80;
// Show seeds
Object.keys(seeds).forEach(function (seedType) {
if (seeds[seedType] > 0) {
var item = new InventoryItem(seedType, seeds[seedType], false);
item.x = startX + currentCol * itemSpacing;
item.y = startY;
self.addChild(item);
self.inventoryTexts.push(item);
currentCol++;
}
});
// Show harvested crops
Object.keys(inventory).forEach(function (cropType) {
if (inventory[cropType] > 0) {
var item = new InventoryItem(cropType, inventory[cropType], true);
item.x = startX + currentCol * itemSpacing;
item.y = startY;
self.addChild(item);
self.inventoryTexts.push(item);
currentCol++;
}
});
};
closeBtn.down = function (x, y, obj) {
self.visible = false;
isInventoryOpen = false;
};
return self;
});
var Minion = Container.expand(function () {
var self = Container.call(this);
// Create minion visual using character asset
var minionGraphics = self.attachAsset('character', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 1.2,
scaleY: 1.2
});
self.targetPlot = null;
self.isMoving = false;
self.harvestTimer = 0;
// Find next ready crop to harvest
self.findNextTarget = function () {
var readyPlots = farmPlots.filter(function (plot) {
return plot.isReady;
});
if (readyPlots.length > 0) {
// Find closest ready plot
var closestPlot = readyPlots[0];
var minDistance = Math.abs(self.x - closestPlot.x) + Math.abs(self.y - closestPlot.y);
readyPlots.forEach(function (plot) {
var distance = Math.abs(self.x - plot.x) + Math.abs(self.y - plot.y);
if (distance < minDistance) {
minDistance = distance;
closestPlot = plot;
}
});
return closestPlot;
}
return null;
};
// Move to target plot
self.moveToPlot = function (plot) {
if (self.isMoving || !plot) return;
self.isMoving = true;
self.targetPlot = plot;
// Calculate movement duration based on distance
var distance = Math.sqrt(Math.pow(plot.x - self.x, 2) + Math.pow(plot.y - self.y, 2));
var duration = Math.max(500, distance * 2); // Minimum 0.5 seconds
// Animate movement to plot
tween(self, {
x: plot.x,
y: plot.y
}, {
duration: duration,
easing: tween.easeInOut,
onFinish: function onFinish() {
self.isMoving = false;
self.harvestCrop();
}
});
// Add walking animation - slight bouncing
tween(minionGraphics, {
scaleY: 1.4
}, {
duration: 200,
easing: tween.easeInOut
});
tween(minionGraphics, {
scaleY: 1.2
}, {
duration: 200,
easing: tween.easeInOut
});
};
// Harvest crop at current location
self.harvestCrop = function () {
if (self.targetPlot && self.targetPlot.isReady) {
var harvest = self.targetPlot.harvestCrop();
if (harvest) {
// Add to inventory
if (!inventory[harvest.type]) {
inventory[harvest.type] = 0;
}
inventory[harvest.type]++;
// Show harvested crop above minion's head
var harvestedCropDisplay = self.addChild(LK.getAsset(harvest.type, {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: -80,
scaleX: 0.8,
scaleY: 0.8
}));
// Animate the harvested crop display
tween(harvestedCropDisplay, {
y: -120,
alpha: 0.7
}, {
duration: 800,
easing: tween.easeOut
});
tween(harvestedCropDisplay, {
alpha: 0
}, {
duration: 1200,
easing: tween.easeInOut,
onFinish: function onFinish() {
harvestedCropDisplay.destroy();
}
});
// Add harvest animation - flash green
tween(minionGraphics, {
tint: 0x00ff00
}, {
duration: 300,
easing: tween.easeInOut
});
tween(minionGraphics, {
tint: 0xffffff
}, {
duration: 300,
easing: tween.easeInOut
});
updateUI();
}
}
self.targetPlot = null;
};
// Wander around the farm when there's nothing to harvest
self.wanderAround = function () {
if (self.isMoving || farmPlots.length === 0) return;
// Pick a random farm plot to visit
var randomIndex = Math.floor(Math.random() * farmPlots.length);
var randomPlot = farmPlots[randomIndex];
if (randomPlot) {
self.isMoving = true;
// Calculate movement duration based on distance
var distance = Math.sqrt(Math.pow(randomPlot.x - self.x, 2) + Math.pow(randomPlot.y - self.y, 2));
var duration = Math.max(1000, distance * 3); // Slower wandering movement
// Animate movement to random plot
tween(self, {
x: randomPlot.x,
y: randomPlot.y
}, {
duration: duration,
easing: tween.easeInOut,
onFinish: function onFinish() {
self.isMoving = false;
}
});
// Add walking animation - slight bouncing
tween(minionGraphics, {
scaleY: 1.4
}, {
duration: 200,
easing: tween.easeInOut
});
tween(minionGraphics, {
scaleY: 1.2
}, {
duration: 200,
easing: tween.easeInOut
});
}
};
self.update = function () {
// Only act if not currently moving
if (!self.isMoving) {
self.harvestTimer++;
// Look for crops to harvest every 60 ticks (1 second)
if (self.harvestTimer >= 60) {
self.harvestTimer = 0;
var nextTarget = self.findNextTarget();
if (nextTarget) {
self.moveToPlot(nextTarget);
} else {
// No crops to harvest, wander around
self.wanderAround();
}
}
}
};
return self;
});
var SellPanel = Container.expand(function () {
var self = Container.call(this);
// Create rounded horizontal background
var panelBg = LK.getAsset('shopPanel', {
anchorX: 0.5,
anchorY: 0.5
});
// Make corners rounded by scaling height and applying visual rounding effect
panelBg.scale.set(1.5, 0.6); // Make it wider and more horizontal like inventory panel
self.addChild(panelBg);
var titleText = new Text2('VENDER CULTIVOS', {
size: 50,
fill: 0x000000
});
titleText.anchor.set(0.5, 0.5);
titleText.x = 0;
titleText.y = -200;
self.addChild(titleText);
var closeBtn = self.addChild(LK.getAsset('closeButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 800,
y: -250
}));
var closeBtnText = new Text2('X', {
size: 30,
fill: 0xFFFFFF
});
closeBtnText.anchor.set(0.5, 0.5);
closeBtn.addChild(closeBtnText);
// Switch to buy panel button
var buyPanelBtn = self.addChild(LK.getAsset('buyButton', {
anchorX: 0.5,
anchorY: 0.5,
x: -700,
y: 200
}));
var buyPanelBtnText = new Text2('COMPRAR', {
size: 30,
fill: 0xFFFFFF
});
buyPanelBtnText.anchor.set(0.5, 0.5);
buyPanelBtn.addChild(buyPanelBtnText);
// Sell all button
var sellAllBtn = self.addChild(LK.getAsset('sellAllButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 700,
y: 200
}));
var sellAllBtnText = new Text2('VENDER TODO', {
size: 35,
fill: 0xFFFFFF
});
sellAllBtnText.anchor.set(0.5, 0.5);
sellAllBtn.addChild(sellAllBtnText);
// Initialize sell texts array
self.sellTexts = [];
self.updateSellSection = function () {
// Clear existing sell items
self.sellTexts.forEach(function (item) {
item.destroy();
});
self.sellTexts = [];
// Create grid layout for sell items
var itemsPerRow = 4;
var itemSpacing = 180;
var currentRow = 0;
var currentCol = 0;
var startX = -300;
var startY = 80;
// Show harvested crops for selling
Object.keys(inventory).forEach(function (cropType) {
if (inventory[cropType] > 0) {
var sellPrice = Math.floor(cropData[cropType].value * 0.8); // 80% of original value
var sellItem = new ShopItem(cropType, sellPrice, true, inventory[cropType]);
sellItem.x = -400 + currentCol * 400;
sellItem.y = startY + currentRow * 200;
self.addChild(sellItem);
self.sellTexts.push(sellItem);
sellItem.button.down = function (x, y, obj) {
if (inventory[cropType] > 0) {
inventory[cropType]--;
coins += sellPrice;
// Award XP for selling crops (4 XP per sale)
addXP(4);
// Animate coin icon when selling crop
animateCoins(true);
LK.getSound('purchase').play();
updateUI();
self.updateSellSection();
}
};
currentCol++;
if (currentCol >= itemsPerRow) {
currentCol = 0;
currentRow++;
}
}
});
};
sellAllBtn.down = function (x, y, obj) {
var totalEarnings = 0;
var totalSoldItems = 0;
Object.keys(inventory).forEach(function (cropType) {
if (inventory[cropType] > 0) {
var sellPrice = Math.floor(cropData[cropType].value * 0.8);
totalEarnings += sellPrice * inventory[cropType];
totalSoldItems += inventory[cropType];
inventory[cropType] = 0;
}
});
if (totalEarnings > 0) {
coins += totalEarnings;
// Award XP for selling all crops (4 XP per item sold)
addXP(4 * totalSoldItems);
// Animate coin icon when selling all crops
animateCoins(true);
LK.getSound('purchase').play();
updateUI();
self.updateSellSection();
}
};
buyPanelBtn.down = function (x, y, obj) {
self.visible = false;
buyPanel.visible = true;
};
closeBtn.down = function (x, y, obj) {
self.visible = false;
isSellPanelOpen = false;
};
return self;
});
var ShopItem = Container.expand(function (itemType, price, isSellItem, count) {
var self = Container.call(this);
// Background slot
var slotBg = self.attachAsset('hotbarSlot', {
anchorX: 0.5,
anchorY: 0.5
});
// Item icon
var itemIcon = self.addChild(LK.getAsset(itemType, {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.8,
scaleY: 0.8
}));
// Price text - larger and positioned above item
var priceText = new Text2(price + ' monedas', {
size: 40,
fill: 0x000000
});
priceText.anchor.set(0.5, 0.5);
priceText.x = 0;
priceText.y = -110;
self.addChild(priceText);
// Count text (for sell items)
if (isSellItem && count > 0) {
self.countText = new Text2('x' + count, {
size: 20,
fill: 0xFFFFFF
});
self.countText.anchor.set(0.5, 0.5);
self.countText.x = 0;
self.countText.y = -40;
self.addChild(self.countText);
}
// Button
var buttonAsset = isSellItem ? 'sellButton' : 'buyButton';
var button = self.addChild(LK.getAsset(buttonAsset, {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: 120
}));
var buttonText = new Text2(isSellItem ? 'VENDER' : 'COMPRAR', {
size: 20,
fill: 0xFFFFFF
});
buttonText.anchor.set(0.5, 0.5);
button.addChild(buttonText);
self.button = button;
self.itemType = itemType;
self.price = price;
self.isSellItem = isSellItem;
self.updateCount = function (newCount) {
if (self.countText) {
self.countText.setText('x' + newCount);
}
self.alpha = newCount > 0 ? 1.0 : 0.3;
};
return self;
});
var UpgradesPanel = Container.expand(function () {
var self = Container.call(this);
// Create rounded horizontal background
var panelBg = LK.getAsset('upgradesPanel', {
anchorX: 0.5,
anchorY: 0.5
});
// Make corners rounded by scaling height and applying visual rounding effect
panelBg.scale.set(1.5, 0.6); // Make it wider and more horizontal like inventory panel
self.addChild(panelBg);
var titleText = new Text2('MEJORAS', {
size: 50,
fill: 0x000000
});
titleText.anchor.set(0.5, 0.5);
titleText.x = 0;
titleText.y = -200;
self.addChild(titleText);
var closeBtn = self.addChild(LK.getAsset('closeButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 800,
y: -250
}));
var closeBtnText = new Text2('X', {
size: 40,
fill: 0xFFFFFF
});
closeBtnText.anchor.set(0.5, 0.5);
closeBtn.addChild(closeBtnText);
// More Plots Upgrade
var plotUpgradeContainer = new Container();
plotUpgradeContainer.x = -400; // Left side positioning within smaller background
plotUpgradeContainer.y = 0; // Center vertically in smaller background
self.addChild(plotUpgradeContainer);
var plotIcon = plotUpgradeContainer.addChild(LK.getAsset('farmPlot', {
anchorX: 0.5,
anchorY: 0.5
}));
var plotTitle = new Text2('MÁS PARCELAS', {
size: 35,
fill: 0x000000
});
plotTitle.anchor.set(0.5, 0.5);
plotTitle.x = 0;
plotTitle.y = 80;
plotUpgradeContainer.addChild(plotTitle);
var plotPrice = new Text2('100 monedas', {
size: 40,
fill: 0x000000
});
plotPrice.anchor.set(0.5, 0.5);
plotPrice.x = 0;
plotPrice.y = -80;
plotUpgradeContainer.addChild(plotPrice);
var plotBtn = plotUpgradeContainer.addChild(LK.getAsset('buyButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: 130
}));
var plotBtnText = new Text2('COMPRAR', {
size: 20,
fill: 0xFFFFFF
});
plotBtnText.anchor.set(0.5, 0.5);
plotBtn.addChild(plotBtnText);
// Speed Upgrade
var speedUpgradeContainer = new Container();
speedUpgradeContainer.x = 0; // Keep centered
speedUpgradeContainer.y = 0; // Center vertically in smaller background
self.addChild(speedUpgradeContainer);
var speedIcon = speedUpgradeContainer.addChild(LK.getAsset('seedling', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 2,
scaleY: 2
}));
var speedTitle = new Text2('ACELERAR CULTIVOS', {
size: 30,
fill: 0x000000
});
speedTitle.anchor.set(0.5, 0.5);
speedTitle.x = 0;
speedTitle.y = 80;
speedUpgradeContainer.addChild(speedTitle);
var speedPrice = new Text2('50 monedas', {
size: 40,
fill: 0x000000
});
speedPrice.anchor.set(0.5, 0.5);
speedPrice.x = 0;
speedPrice.y = -80;
speedUpgradeContainer.addChild(speedPrice);
var speedBtn = speedUpgradeContainer.addChild(LK.getAsset('buyButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: 130
}));
var speedBtnText = new Text2('COMPRAR', {
size: 20,
fill: 0xFFFFFF
});
speedBtnText.anchor.set(0.5, 0.5);
speedBtn.addChild(speedBtnText);
// Companion Upgrade
var companionUpgradeContainer = new Container();
companionUpgradeContainer.x = 400; // Right side positioning within smaller background
companionUpgradeContainer.y = 0; // Center vertically in smaller background
self.addChild(companionUpgradeContainer);
var companionIcon = companionUpgradeContainer.addChild(LK.getAsset('character', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.8,
scaleY: 0.8
}));
var companionTitle = new Text2('COMPAÑERO', {
size: 35,
fill: 0x000000
});
companionTitle.anchor.set(0.5, 0.5);
companionTitle.x = 0;
companionTitle.y = 80;
companionUpgradeContainer.addChild(companionTitle);
var companionPrice = new Text2('800 monedas', {
size: 40,
fill: 0x000000
});
companionPrice.anchor.set(0.5, 0.5);
companionPrice.x = 0;
companionPrice.y = -80;
companionUpgradeContainer.addChild(companionPrice);
var companionBtn = companionUpgradeContainer.addChild(LK.getAsset('buyButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: 130
}));
var companionBtnText = new Text2('COMPRAR', {
size: 20,
fill: 0xFFFFFF
});
companionBtnText.anchor.set(0.5, 0.5);
companionBtn.addChild(companionBtnText);
// Button handlers
plotBtn.down = function (x, y, obj) {
if (coins >= 100 && totalPlots < 64) {
// Max 64 plots (4 grids of 4x4)
coins -= 100;
totalPlots++; // Add one plot at a time
repositionAllPlots(); // Recreate all plots with new layout
storage.totalPlots = totalPlots; // Save the new total
// Award XP for buying plot upgrade (15 XP)
addXP(15);
LK.getSound('purchase').play();
updateUI();
// Close upgrades panel after purchase
self.visible = false;
isUpgradesPanelOpen = false;
}
};
speedBtn.down = function (x, y, obj) {
if (coins >= 50) {
coins -= 50;
// Accelerate all growing crops
farmPlots.forEach(function (plot) {
if (!plot.isEmpty && !plot.isReady) {
plot.plantTime -= 150; // Reduce by 2.5 seconds
}
});
// Award XP for speed upgrade (8 XP)
addXP(8);
LK.getSound('purchase').play();
updateUI();
}
};
// Update companion button appearance based on current state
self.updateCompanionButton = function () {
if (hasCompanion) {
companionBtn.alpha = 0.5;
companionBtnText.setText('COMPRADO');
} else {
companionBtn.alpha = 1.0;
companionBtnText.setText('COMPRAR');
}
};
// Initialize companion button state
self.updateCompanionButton();
companionBtn.down = function (x, y, obj) {
if (coins >= 800 && !hasCompanion) {
coins -= 800;
hasCompanion = true;
self.updateCompanionButton();
// Award XP for companion upgrade (50 XP)
addXP(50);
LK.getSound('purchase').play();
updateUI();
// Create minion when companion is purchased
minion = new Minion();
minion.x = 1024; // Start at center
minion.y = 1200; // Above the farm plots
minion.zIndex = 100; // Render above plots but below UI
game.addChild(minion);
}
};
closeBtn.down = function (x, y, obj) {
self.visible = false;
isUpgradesPanelOpen = false;
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x228B22
});
/****
* Game Code
****/
// Add background image
var backgroundImage = game.addChild(LK.getAsset('gameBackground', {
anchorX: 0,
anchorY: 0,
x: 0,
y: 0
}));
backgroundImage.zIndex = -2000; // Ensure it's behind everything
// Game data
var cropData = {
'crop1': {
name: 'Lechuga',
growthTime: 300,
value: 8
},
// 5 seconds
'crop2': {
name: 'Tomate',
growthTime: 600,
value: 18
},
// 10 seconds
'crop3': {
name: 'Maíz',
growthTime: 900,
value: 35
} // 15 seconds
};
// Reset all stored game progress data to initial values
storage.coins = 50;
storage.seeds = {
'crop1': 5,
'crop2': 0,
'crop3': 0
};
storage.inventory = {};
storage.hasCompanion = false;
storage.totalPlots = 16;
storage.level = 1;
storage.xp = 0;
// Game state - load from storage or use defaults
var coins = storage.coins || 50;
var seeds = storage.seeds || {
'crop1': 5,
'crop2': 0,
'crop3': 0
};
var inventory = storage.inventory || {};
var selectedSeed = 'crop1';
var isBuyPanelOpen = false;
var isSellPanelOpen = false;
var isInventoryOpen = false;
var isUpgradesPanelOpen = false;
var hasCompanion = storage.hasCompanion || false;
var companionTimer = 0;
var minion = null;
var level = storage.level || 1;
var xp = storage.xp || 0;
// No minion at start since companion is not purchased
// UI elements
var coinsContainer = new Container();
coinsContainer.x = 1024; // Position at top center
coinsContainer.y = 150; // Position at top
coinsContainer.zIndex = 400;
game.addChild(coinsContainer);
var coinIcon = coinsContainer.addChild(LK.getAsset('coinIcon', {
anchorX: 0.5,
anchorY: 0.5,
x: 100,
y: 40
}));
// Make coinIcon globally accessible for animations
window.coinIcon = coinIcon;
var coinsText = new Text2(coins.toString(), {
size: 120,
fill: 0xFFD700,
fontStyle: 'bold',
dropShadow: true,
dropShadowColor: 0x000000,
dropShadowBlur: 4,
dropShadowDistance: 3,
stroke: 0x000000,
strokeThickness: 8
});
coinsText.anchor.set(0.5, 0.5);
coinsText.x = -30;
coinsText.y = 40;
coinsContainer.addChild(coinsText);
// Create seasons and time system
var gameStartTime = Date.now();
var timeMultiplier = 20; // 1 real minute = 20 game minutes (slower time)
var currentSeason = 0; // 0=Primavera, 1=Verano, 2=Otoño, 3=Invierno
var seasonNames = ['Primavera', 'Verano', 'Otoño', 'Invierno'];
var dayOfYear = 1;
var currentYear = 2024;
// Create time/season display container in top-right
var timeContainer = new Container();
timeContainer.x = 1900; // Top-right position (leaving margin from edge)
timeContainer.y = 200; // Top position
timeContainer.zIndex = 500;
game.addChild(timeContainer);
// Add semi-transparent background behind time/season display
var timeBackground = timeContainer.addChild(LK.getAsset('fullScreenOverlay', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.25,
scaleY: 0.15,
x: -130,
y: 0
}));
timeBackground.alpha = 0.3; // Low opacity
timeBackground.zIndex = -1; // Behind the text elements
// Time display
var timeText = new Text2('12:00', {
size: 90,
fill: 0xFFFFFF,
fontStyle: 'bold',
dropShadow: true,
dropShadowColor: 0x000000,
dropShadowBlur: 3,
dropShadowDistance: 3,
stroke: 0x000000,
strokeThickness: 6
});
timeText.anchor.set(1.0, 0.5);
timeText.x = 0;
timeText.y = -80;
timeContainer.addChild(timeText);
// Date display
var dateText = new Text2('1 Ene 2024', {
size: 80,
fill: 0xFFFFFF,
fontStyle: 'bold',
dropShadow: true,
dropShadowColor: 0x000000,
dropShadowBlur: 3,
dropShadowDistance: 3,
stroke: 0x000000,
strokeThickness: 5
});
dateText.anchor.set(1.0, 0.5);
dateText.x = 0;
dateText.y = 0;
timeContainer.addChild(dateText);
// Season display
var seasonText = new Text2('Primavera', {
size: 85,
fill: 0x90EE90,
fontStyle: 'bold',
dropShadow: true,
dropShadowColor: 0x000000,
dropShadowBlur: 3,
dropShadowDistance: 3,
stroke: 0x000000,
strokeThickness: 6
});
seasonText.anchor.set(1.0, 0.5);
seasonText.x = 0;
seasonText.y = 80;
timeContainer.addChild(seasonText);
// Function to update time and season display
function updateTimeAndSeason() {
var elapsedRealTime = Date.now() - gameStartTime;
// Make 1 game minute pass every 3 seconds (3000ms)
var elapsedGameMinutes = Math.floor(elapsedRealTime / 3000);
var elapsedGameHours = Math.floor(elapsedGameMinutes / 60);
// Calculate current time (24-hour cycle)
var currentHour = (12 + elapsedGameHours) % 24; // Start at 12:00
var currentMinute = elapsedGameMinutes % 60;
// Format time display
var hourStr = currentHour < 10 ? '0' + currentHour : currentHour.toString();
var minuteStr = currentMinute < 10 ? '0' + currentMinute : currentMinute.toString();
timeText.setText(hourStr + ':' + minuteStr);
// Calculate current day (new day every 24 game hours)
var totalGameDays = Math.floor(elapsedGameHours / 24);
var currentDayOfYear = (dayOfYear + totalGameDays - 1) % 365 + 1;
var currentGameYear = currentYear + Math.floor((dayOfYear + totalGameDays - 1) / 365);
// Calculate season (each season lasts ~91 days)
var seasonIndex = Math.floor((currentDayOfYear - 1) / 91) % 4;
if (seasonIndex !== currentSeason) {
currentSeason = seasonIndex;
// Update season color
var seasonColors = [0x90EE90, 0xFFD700, 0xFF8C00, 0x87CEEB]; // Spring, Summer, Autumn, Winter
seasonText.tint = seasonColors[currentSeason];
}
// Format date display
var monthNames = ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'];
var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var remainingDays = currentDayOfYear;
var month = 0;
while (remainingDays > daysInMonth[month] && month < 11) {
remainingDays -= daysInMonth[month];
month++;
}
dateText.setText(remainingDays + ' ' + monthNames[month] + ' ' + currentGameYear);
seasonText.setText(seasonNames[currentSeason]);
}
// Create XP progress bar container
var xpContainer = new Container();
xpContainer.x = 1024; // Center horizontally
xpContainer.y = 2450; // Below tab buttons - moved a little lower
xpContainer.zIndex = 400;
game.addChild(xpContainer);
// XP progress bar background
var xpBarBg = xpContainer.addChild(LK.getAsset('inventoryPanel', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 1.14,
scaleY: 0.15
}));
// XP progress bar fill
var xpBarFill = xpContainer.addChild(LK.getAsset('inventoryPanel', {
anchorX: 0,
anchorY: 0.5,
scaleX: 1.14,
scaleY: 0.15,
x: -1024,
tint: 0x0000ff
}));
// Level text
var levelText = new Text2('Nivel ' + level, {
size: 90,
fill: 0xFFFFFF,
fontStyle: 'bold',
dropShadow: true,
dropShadowColor: 0x000000,
dropShadowBlur: 2,
dropShadowDistance: 2,
stroke: 0x000000,
strokeThickness: 8
});
levelText.anchor.set(0.5, 0.5);
levelText.x = 0;
levelText.y = -10;
xpContainer.addChild(levelText);
// XP text
var xpText = new Text2('', {
size: 70,
fill: 0xFFFFFF,
fontStyle: 'bold',
dropShadow: true,
dropShadowColor: 0x000000,
dropShadowBlur: 2,
dropShadowDistance: 2,
stroke: 0x000000,
strokeThickness: 3
});
xpText.anchor.set(1.0, 0.5);
xpText.x = 900;
xpText.y = 50;
xpContainer.addChild(xpText);
// Create horizontal tabs container positioned above coins
var tabsContainer = new Container();
tabsContainer.x = 1024;
tabsContainer.y = 2300; // Position above coins text - moved higher
tabsContainer.zIndex = 500; // Ensure tabs render above coins
game.addChild(tabsContainer);
// Shop button
var shopBtn = LK.getAsset('shopButton', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 1.2,
scaleY: 1.2
});
var shopBtnText = new Text2('TIENDA', {
size: 35,
fill: 0xFFFFFF
});
shopBtnText.anchor.set(0.5, 0.5);
shopBtn.addChild(shopBtnText);
shopBtn.x = -300;
shopBtn.y = 0;
tabsContainer.addChild(shopBtn);
// Inventory button
var invBtn = LK.getAsset('inventoryButton', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 1.2,
scaleY: 1.2
});
var invBtnText = new Text2('INVENTARIO', {
size: 30,
fill: 0xFFFFFF
});
invBtnText.anchor.set(0.5, 0.5);
invBtn.addChild(invBtnText);
invBtn.x = 0;
invBtn.y = 0;
tabsContainer.addChild(invBtn);
// Upgrades button
var upgradesBtn = LK.getAsset('upgradesButton', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 1.2,
scaleY: 1.2
});
var upgradesBtnText = new Text2('MEJORAS', {
size: 30,
fill: 0xFFFFFF
});
upgradesBtnText.anchor.set(0.5, 0.5);
upgradesBtn.addChild(upgradesBtnText);
upgradesBtn.x = 300;
upgradesBtn.y = 0;
tabsContainer.addChild(upgradesBtn);
// Create farm plots in 4x4 grid
var farmPlots = [];
var totalPlots = storage.totalPlots || 16; // Load from storage or start with 16 plots (4x4)
var plotSpacingX = 140;
var plotSpacingY = 100;
var plotMargin = 30; // Margin between plot groups
// Calculate center position for the main 4x4 grid
var mainGridCenterX = 1024; // Center of screen
var mainGridCenterY = 900; // Positioned to avoid UI overlap
// Calculate starting position for centered 4x4 grid
var mainStartX = mainGridCenterX - 3 * plotSpacingX / 2;
var mainStartY = mainGridCenterY - 3 * plotSpacingY / 2;
function createPlotAtPosition(x, y) {
var plot = new FarmPlot();
plot.x = x;
plot.y = y;
game.addChild(plot);
farmPlots.push(plot);
}
function repositionAllPlots() {
// Clear existing plots
farmPlots.forEach(function (plot) {
plot.destroy();
});
farmPlots = [];
var plotsCreated = 0;
// Main 4x4 grid (center)
for (var row = 0; row < 4 && plotsCreated < totalPlots; row++) {
for (var col = 0; col < 4 && plotsCreated < totalPlots; col++) {
createPlotAtPosition(mainStartX + col * plotSpacingX, mainStartY + row * plotSpacingY);
plotsCreated++;
}
}
// Right 4x4 grid (if more than 16 plots)
if (totalPlots > 16) {
var rightStartX = mainStartX + 4 * plotSpacingX + plotMargin;
var rightStartY = mainStartY;
for (var row = 0; row < 4 && plotsCreated < totalPlots; row++) {
for (var col = 0; col < 4 && plotsCreated < totalPlots; col++) {
createPlotAtPosition(rightStartX + col * plotSpacingX, rightStartY + row * plotSpacingY);
plotsCreated++;
}
}
}
// Bottom-left 4x4 grid (if more than 32 plots)
if (totalPlots > 32) {
var bottomLeftStartX = mainStartX;
var bottomLeftStartY = mainStartY + 4 * plotSpacingY + plotMargin;
for (var row = 0; row < 4 && plotsCreated < totalPlots; row++) {
for (var col = 0; col < 4 && plotsCreated < totalPlots; col++) {
createPlotAtPosition(bottomLeftStartX + col * plotSpacingX, bottomLeftStartY + row * plotSpacingY);
plotsCreated++;
}
}
}
// Bottom-right 4x4 grid (if more than 48 plots)
if (totalPlots > 48) {
var bottomRightStartX = mainStartX + 4 * plotSpacingX + plotMargin;
var bottomRightStartY = mainStartY + 4 * plotSpacingY + plotMargin;
for (var row = 0; row < 4 && plotsCreated < totalPlots; row++) {
for (var col = 0; col < 4 && plotsCreated < totalPlots; col++) {
createPlotAtPosition(bottomRightStartX + col * plotSpacingX, bottomRightStartY + row * plotSpacingY);
plotsCreated++;
}
}
}
// Ensure all farm plots render below interface panels
farmPlots.forEach(function (plot) {
plot.zIndex = -1000;
});
}
// Initialize farm plots
repositionAllPlots();
// Buy and sell panels - positioned as horizontal scroll above coins
var buyPanel = new BuyPanel();
buyPanel.x = 1024;
buyPanel.y = 1800;
buyPanel.visible = false;
buyPanel.zIndex = 600;
game.addChild(buyPanel);
var sellPanel = new SellPanel();
sellPanel.x = 1024;
sellPanel.y = 1800;
sellPanel.visible = false;
sellPanel.zIndex = 600;
game.addChild(sellPanel);
var inventoryPanel = new InventoryPanel();
inventoryPanel.x = 1024;
inventoryPanel.y = 1800;
inventoryPanel.visible = false;
inventoryPanel.zIndex = 600;
game.addChild(inventoryPanel);
var upgradesPanel = new UpgradesPanel();
upgradesPanel.x = 1024;
upgradesPanel.y = 1800;
upgradesPanel.visible = false;
upgradesPanel.zIndex = 600;
game.addChild(upgradesPanel);
// Button event handlers
shopBtn.down = function (x, y, obj) {
if (!isInventoryOpen && !isSellPanelOpen && !isUpgradesPanelOpen) {
buyPanel.visible = true;
isBuyPanelOpen = true;
}
};
invBtn.down = function (x, y, obj) {
if (!isBuyPanelOpen && !isSellPanelOpen && !isUpgradesPanelOpen) {
inventoryPanel.visible = true;
inventoryPanel.updateInventory();
isInventoryOpen = true;
}
};
upgradesBtn.down = function (x, y, obj) {
if (!isBuyPanelOpen && !isSellPanelOpen && !isInventoryOpen) {
upgradesPanel.visible = true;
isUpgradesPanelOpen = true;
}
};
// Create hotbar
var hotbarSlots = [];
var hotbarContainer = new Container();
hotbarContainer.x = 1024;
hotbarContainer.y = 2600;
hotbarContainer.zIndex = 400;
game.addChild(hotbarContainer);
// Create hotbar slots for each seed type
var seedTypes = ['crop1', 'crop2', 'crop3'];
seedTypes.forEach(function (seedType, index) {
var slot = new HotbarSlot(seedType, index);
slot.x = (index - 1) * 180;
slot.y = 0;
hotbarContainer.addChild(slot);
hotbarSlots.push(slot);
});
function updateHotbar() {
hotbarSlots.forEach(function (slot) {
var count = seeds[slot.seedType] || 0;
slot.updateCount(count);
slot.setSelected(slot.seedType === selectedSeed);
});
}
// Initialize hotbar
updateHotbar();
// Initialize XP bar
updateXPBar();
// Remove old seed selection behavior - hotbar handles it now
game.down = function (x, y, obj) {
// Hotbar slots handle their own clicks now
};
var lastCoins = coins; // Track last coins value for animation detection
// Calculate XP needed for a specific level
function getXPForLevel(targetLevel) {
if (targetLevel === 1) return 0;
if (targetLevel === 2) return 20; // First level only needs 20 XP
return Math.floor(100 * Math.pow(1.5, targetLevel - 2));
}
// Get current level's XP requirement
function getCurrentLevelXP() {
return getXPForLevel(level);
}
// Get next level's XP requirement
function getNextLevelXP() {
return getXPForLevel(level + 1);
}
// Add XP and handle level ups
function addXP(amount) {
xp += amount;
// Check for level up
var nextLevelXP = getNextLevelXP();
if (xp >= nextLevelXP) {
level++;
// Flash screen gold for level up
LK.effects.flashScreen(0xFFD700, 800);
// Animate XP bar
tween(xpContainer, {
scaleX: 1.2,
scaleY: 1.2
}, {
duration: 400,
easing: tween.easeOut
});
tween(xpContainer, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 400,
easing: tween.easeInOut
});
}
updateXPBar();
}
// Update XP progress bar visual
function updateXPBar() {
var currentLevelXP = getCurrentLevelXP();
var nextLevelXP = getNextLevelXP();
var progressXP = xp - currentLevelXP;
var levelXPRange = nextLevelXP - currentLevelXP;
var progress = Math.min(progressXP / levelXPRange, 1.0);
// Update bar fill using scaleX to match background thickness exactly
xpBarFill.scaleX = 1.14 * progress;
xpBarFill.scaleY = 0.15; // Match background scaleY exactly
// Update texts
levelText.setText('Nivel ' + level);
xpText.setText(progressXP + '/' + levelXPRange + ' XP');
}
function animateCoins(increase) {
if (increase) {
// Animate for coin increase (green pulse and scale up)
tween(window.coinIcon, {
scaleX: 1.3,
scaleY: 1.3,
tint: 0x00ff00
}, {
duration: 200,
easing: tween.easeOut
});
tween(window.coinIcon, {
scaleX: 1.0,
scaleY: 1.0,
tint: 0xffffff
}, {
duration: 300,
easing: tween.easeInOut
});
} else {
// Animate for coin decrease (red pulse and slight shrink)
tween(window.coinIcon, {
scaleX: 0.8,
scaleY: 0.8,
tint: 0xff0000
}, {
duration: 200,
easing: tween.easeOut
});
tween(window.coinIcon, {
scaleX: 1.0,
scaleY: 1.0,
tint: 0xffffff
}, {
duration: 300,
easing: tween.easeInOut
});
}
}
function updateUI() {
// Store current text before updating
var currentText = coinsText.text;
var newText = coins.toString();
// Update the coins text
coinsText.setText(newText);
updateHotbar();
updateXPBar();
// Check if the displayed text actually changed and animate accordingly
if (currentText !== newText) {
if (coins > lastCoins) {
animateCoins(true); // Coins increased
} else if (coins < lastCoins) {
animateCoins(false); // Coins decreased
}
}
lastCoins = coins; // Update last coins value
// Save progress
storage.coins = coins;
storage.seeds = seeds;
storage.inventory = inventory;
storage.hasCompanion = hasCompanion;
storage.level = level;
storage.xp = xp;
}
game.update = function () {
// Update all farm plots
farmPlots.forEach(function (plot) {
// Plot update is called automatically
});
// Minion handles harvesting automatically through its own update method
// Update time and season display every 30 ticks (0.5 seconds)
if (LK.ticks % 30 === 0) {
updateTimeAndSeason();
}
}; ===================================================================
--- original.js
+++ change.js
@@ -1100,11 +1100,11 @@
// Add semi-transparent background behind time/season display
var timeBackground = timeContainer.addChild(LK.getAsset('fullScreenOverlay', {
anchorX: 0.5,
anchorY: 0.5,
- scaleX: 0.2,
+ scaleX: 0.25,
scaleY: 0.15,
- x: -100,
+ x: -130,
y: 0
}));
timeBackground.alpha = 0.3; // Low opacity
timeBackground.zIndex = -1; // Behind the text elements
buy button. In-Game asset. 2d. High contrast. No shadows
inventory button. In-Game asset. 2d. High contrast. No shadows
shop button. In-Game asset. 2d. High contrast. No shadows
X button. In-Game asset. 2d. High contrast. No shadows
dirt. In-Game asset. 2d. High contrast. No shadows
lechuga. In-Game asset. 2d. High contrast. No shadows
tomate. In-Game asset. 2d. High contrast. No shadows
semilla. In-Game asset. 2d. High contrast. No shadows
sell button. In-Game asset. 2d. High contrast. No shadows
maiz. In-Game asset. 2d. High contrast. No shadows
sell all button. In-Game asset. 2d. High contrast. No shadows
upgrade button. In-Game asset. 2d. High contrast. No shadows
Hotbar slot. In-Game asset. 2d. High contrast. No shadows
Quita el cesped de abajo
Flying minion flower. In-Game asset. 2d. High contrast. No shadows
Aspersor. In-Game asset. 2d. High contrast. No shadows
Que sea verde y hectagonal
Arbol de habilidades botón. In-Game asset. 2d. High contrast. No shadows
calabaza. In-Game asset. 2d. High contrast. No shadows
sandia entera
planta uva. In-Game asset. 2d. High contrast. No shadows
trufa. In-Game asset. 2d. High contrast. No shadows
orquidea. In-Game asset. 2d. High contrast. No shadows