User prompt
lower bodyi 25 derece sola doğru çevir ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
calfı 50 pixel aşağı kaydır ayakla birlikte ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
thigh i kaldır diğerlerini uçlarından birleştir ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
bacak kısmı 3 parça olsun demek istemiştim
User prompt
güzel fakat daha kapsamlı düşün assetlerini ayrı ver
User prompt
bacaklar vücuda yapışık olsun ve diz kapağı ekleminin ordan kırılsın daha gerçekçi şekilde oturuyor gözüksün ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
elleri fixle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
sol eli 10 pixel dışarıya çıkart ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
tekrar yap
User prompt
elleri kolların ucundan -4 pixel olacak şekilde birleştir ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
gitar benchin yanında benche dayanmış şekilde dursun
User prompt
ayaklarını 1.3x büyüt ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
karakterin ayakları arasındaki mesafeyi 2x küçült ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
karakteri benche oturttur
User prompt
karakteri 1.15x büyüt ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
20 daha indir
User prompt
kafa 10 pixel aşağı kaydır
User prompt
eller kolların ucunda bağlantılı olsun
User prompt
gitarı tutuyormuş gibi olsun ve hands asseti ekle
User prompt
kolları 5 pixel yukarı kaydır
User prompt
left arm assets and right arm assets
User prompt
kolları sol kol ve sağ kol olarak ikiye ayır
Code edit (1 edits merged)
Please save this source code
User prompt
add a floor behinde the lamp and musician
User prompt
add a new cobble stone background
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var ActionButton = Container.expand(function (text, action, assetType) {
var self = Container.call(this);
var buttonAsset = assetType || 'performButton';
var button = self.attachAsset(buttonAsset, {
anchorX: 0.5,
anchorY: 0.5
});
var buttonText = new Text2(text, {
size: 48,
fill: 0x000000,
font: "'Arial Black','Arial',sans-serif"
});
buttonText.anchor.set(0.5, 1);
buttonText.x = 0;
buttonText.y = -50;
self.addChild(buttonText);
self.action = action;
self.down = function (x, y, obj) {
if (self.action) {
self.action();
}
};
return self;
});
var CollapsibleWindow = Container.expand(function () {
var self = Container.call(this);
// Create window background
var windowBg = self.attachAsset('tabBackground', {
anchorX: 1,
anchorY: 0.5
});
// Create handle for toggle - positioned at screen edge
var handle = self.attachAsset('tabHandle', {
anchorX: 1,
anchorY: 0.5,
x: 0,
y: 0
});
// Add handle text
var handleText = new Text2('NAV', {
size: 20,
fill: 0xFFFFFF,
font: "'Arial Black','Arial',sans-serif"
});
handleText.anchor.set(0.5, 0.5);
handleText.x = -15;
handleText.y = 0;
handle.addChild(handleText);
self.isOpen = false;
self.buttons = [];
// Toggle window open/closed
self.toggle = function () {
self.isOpen = !self.isOpen;
var targetX = self.isOpen ? 0 : windowBg.width;
var handleTargetX = self.isOpen ? -windowBg.width + 125 : 0;
tween(windowBg, {
x: targetX
}, {
duration: 500,
easing: tween.easeInOut
});
tween(handle, {
x: handleTargetX
}, {
duration: 500,
easing: tween.easeInOut
});
// Update button visibility
for (var i = 0; i < self.buttons.length; i++) {
self.buttons[i].visible = self.isOpen;
}
};
// Add navigation button to window
self.addNavButton = function (text, targetLocation, assetType, yOffset) {
var button = new NavigationButton(text, targetLocation, assetType);
button.x = -200;
button.y = yOffset;
button.scaleX = 1.3;
button.scaleY = 1.3;
button.visible = false;
windowBg.addChild(button);
self.buttons.push(button);
return button;
};
// Handle click on handle
handle.down = function (x, y, obj) {
self.toggle();
};
// Initially closed - position completely off-screen
windowBg.x = windowBg.width;
return self;
});
var Location = Container.expand(function (type, name, earningMultiplier, cost) {
var self = Container.call(this);
self.type = type;
self.name = name;
self.earningMultiplier = earningMultiplier;
self.cost = cost;
self.unlocked = type === 'street';
var locationGraphics = self.attachAsset(type, {
anchorX: 0.5,
anchorY: 0.5
});
var nameText = new Text2(name, {
size: 24,
fill: 0xFFFFFF
});
nameText.anchor.set(0.5, 0);
nameText.x = 0;
nameText.y = locationGraphics.height / 2 + 10;
self.addChild(nameText);
self.down = function (x, y, obj) {
if (self.unlocked) {
selectLocation(self);
}
};
return self;
});
var Musician = Container.expand(function () {
var self = Container.call(this);
// Main upper body - centered as the base
var upperBody = self.attachAsset('musicianUpperBody', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: -40
});
// Add lower body/pelvis below upper body
var lowerBody = self.attachAsset('musicianLowerBody', {
anchorX: 0.5,
anchorY: 0,
x: 0,
y: 50
});
// Add head positioned above upper body
var head = self.attachAsset('musicianHead', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: -170
});
// Add left arm positioned at shoulder level
self.leftArm = self.attachAsset('musicianLeftArm', {
anchorX: 0.5,
anchorY: 0,
x: -110,
y: -125
});
// Add right arm positioned at shoulder level
self.rightArm = self.attachAsset('musicianRightArm', {
anchorX: 0.5,
anchorY: 0,
x: 110,
y: -125
});
// Add left calf attached directly to lower body
var leftCalf = lowerBody.attachAsset('musicianCalf', {
anchorX: 0.5,
anchorY: 0,
x: -25,
y: 20,
rotation: -0.8
// Angled downward for sitting position
});
// Add left foot attached to calf at ankle
var leftFoot = leftCalf.attachAsset('musicianFoot', {
anchorX: 0.5,
anchorY: 0,
x: 0,
y: 95,
rotation: 0.8
// Angled for natural foot position
});
// Add right calf attached directly to lower body
var rightCalf = lowerBody.attachAsset('musicianCalf', {
anchorX: 0.5,
anchorY: 0,
x: 25,
y: 20,
rotation: -0.8
// Angled downward for sitting position
});
// Add right foot attached to calf at ankle
var rightFoot = rightCalf.attachAsset('musicianFoot', {
anchorX: 0.5,
anchorY: 0,
x: 0,
y: 95,
rotation: 0.8
// Angled for natural foot position
});
// Add left hand positioned at the end of left arm
self.leftHand = self.leftArm.attachAsset('leftHand', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: 200
});
// Add right hand positioned at the end of right arm
self.rightHand = self.rightArm.attachAsset('rightHand', {
anchorX: 0.5,
anchorY: 0.5,
x: 0,
y: 210
});
// Position guitar next to bench, leaning against it
var guitar = self.attachAsset('guitar', {
anchorX: 0.5,
anchorY: 1,
x: 200,
y: 150
});
self.perform = function () {
// Animate guitar
tween(guitar, {
rotation: 0.2
}, {
duration: 200,
onFinish: function onFinish() {
tween(guitar, {
rotation: -0.2
}, {
duration: 200,
onFinish: function onFinish() {
tween(guitar, {
rotation: 0
}, {
duration: 200
});
}
});
}
});
// Animate right arm (strumming)
tween(self.rightArm, {
rotation: 0.3
}, {
duration: 200,
onFinish: function onFinish() {
tween(self.rightArm, {
rotation: -0.3
}, {
duration: 200,
onFinish: function onFinish() {
tween(self.rightArm, {
rotation: 0
}, {
duration: 200
});
}
});
}
});
// Animate left arm slightly
tween(self.leftArm, {
rotation: -0.1
}, {
duration: 600,
onFinish: function onFinish() {
tween(self.leftArm, {
rotation: 0
}, {
duration: 200
});
}
});
// Animate left hand to follow arm movement
tween(self.leftHand, {
rotation: 0.15,
x: -5
}, {
duration: 600,
onFinish: function onFinish() {
tween(self.leftHand, {
rotation: 0,
x: 0
}, {
duration: 200
});
}
});
// Animate right hand to follow strumming motion
tween(self.rightHand, {
rotation: 0.2,
x: 5
}, {
duration: 200,
onFinish: function onFinish() {
tween(self.rightHand, {
rotation: -0.2,
x: -5
}, {
duration: 200,
onFinish: function onFinish() {
tween(self.rightHand, {
rotation: 0,
x: 0
}, {
duration: 200
});
}
});
}
});
LK.getSound('guitarStrum').play();
};
return self;
});
var NavigationButton = Container.expand(function (text, targetLocation, assetType) {
var self = Container.call(this);
var button = self.attachAsset(assetType, {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.6,
scaleY: 0.6
});
var buttonText = new Text2(text, {
size: 24,
fill: 0xFFFFFF,
font: "'Arial Black','Arial',sans-serif"
});
buttonText.anchor.set(0.5, 0.5);
buttonText.x = 0;
buttonText.y = 0;
self.addChild(buttonText);
self.targetLocation = targetLocation;
self.down = function (x, y, obj) {
navigateToLocation(self.targetLocation);
};
return self;
});
var ResourceBar = Container.expand(function (label, color, maxValue) {
var self = Container.call(this);
self.maxValue = maxValue;
self.currentValue = maxValue;
var bg = self.attachAsset('resourceBg', {
anchorX: 0,
anchorY: 0
});
var bar = self.attachAsset('resourceBar', {
anchorX: 0,
anchorY: 0,
x: 2,
y: 2
});
bar.tint = color;
self.bar = bar;
// Add percentage text centered in the bar
var valueText = new Text2('100%', {
size: 24,
fill: 0x000000,
font: "'Arial Black','Arial',sans-serif"
});
valueText.anchor.set(0.5, 0.5);
valueText.x = 152;
valueText.y = 17;
self.addChild(valueText);
self.valueText = valueText;
self.updateBar = function () {
var percentage = Math.max(0, self.currentValue / self.maxValue);
self.bar.width = 300 * percentage;
self.valueText.setText(Math.round(percentage * 100) + '%');
if (percentage < 0.3) {
self.bar.tint = 0xFF0000;
} else if (percentage < 0.6) {
self.bar.tint = 0xFFFF00;
} else {
self.bar.tint = color;
}
};
self.setValue = function (value) {
self.currentValue = Math.max(0, Math.min(self.maxValue, value));
self.updateBar();
};
self.addValue = function (amount) {
self.setValue(self.currentValue + amount);
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x87CEEB
});
/****
* Game Code
****/
// Game state variables
var currentDay = 1;
var money = 10;
var followers = 0;
var concerts = 0;
var musicSkill = 10;
var equipmentLevel = 1;
var socialMediaUnlocked = false;
// Resources
var foodLevel = 100;
var waterLevel = 100;
var healthLevel = 100;
var moodLevel = 80;
var sleepLevel = 80;
// Game state
var currentLocation = null;
var gamePhase = 'playing'; // 'playing', 'gameOver', 'won'
// UI Elements
var dayText = new Text2('Day 1', {
size: 40,
fill: 0x000000
});
dayText.anchor.set(0.5, 0);
LK.gui.top.addChild(dayText);
var moneyText = new Text2('$10', {
size: 30,
fill: 0x000000
});
moneyText.anchor.set(1, 0);
moneyText.x = -20;
moneyText.y = 60;
LK.gui.topRight.addChild(moneyText);
var followersText = new Text2('Followers: 0', {
size: 25,
fill: 0x000000
});
followersText.anchor.set(0, 0);
followersText.x = 20;
followersText.y = 60;
LK.gui.topLeft.addChild(followersText);
// Create resource bars arranged side by side
var barStartX = 200;
var barSpacing = 320;
var barY = 150;
var foodBar = new ResourceBar('', 0x32CD32, 100);
foodBar.x = barStartX;
foodBar.y = barY;
game.addChild(foodBar);
var waterBar = new ResourceBar('', 0x1E90FF, 100);
waterBar.x = barStartX + barSpacing;
waterBar.y = barY;
game.addChild(waterBar);
var healthBar = new ResourceBar('', 0xFF6347, 100);
healthBar.x = barStartX + barSpacing * 2;
healthBar.y = barY;
game.addChild(healthBar);
var moodBar = new ResourceBar('', 0xFFD700, 100);
moodBar.x = barStartX + barSpacing * 3;
moodBar.y = barY;
game.addChild(moodBar);
var sleepBar = new ResourceBar('', 0x9370DB, 100);
sleepBar.x = barStartX + barSpacing * 4;
sleepBar.y = barY;
game.addChild(sleepBar);
// Add labels below the bars
var foodLabel = new Text2('Food', {
size: 32,
fill: 0x000000,
font: "'Arial Black','Arial',sans-serif"
});
foodLabel.anchor.set(0.5, 0);
foodLabel.x = barStartX + 152;
foodLabel.y = barY + 50;
game.addChild(foodLabel);
var waterLabel = new Text2('Water', {
size: 32,
fill: 0x000000,
font: "'Arial Black','Arial',sans-serif"
});
waterLabel.anchor.set(0.5, 0);
waterLabel.x = barStartX + barSpacing + 152;
waterLabel.y = barY + 50;
game.addChild(waterLabel);
var healthLabel = new Text2('Health', {
size: 32,
fill: 0x000000,
font: "'Arial Black','Arial',sans-serif"
});
healthLabel.anchor.set(0.5, 0);
healthLabel.x = barStartX + barSpacing * 2 + 152;
healthLabel.y = barY + 50;
game.addChild(healthLabel);
var moodLabel = new Text2('Mood', {
size: 32,
fill: 0x000000,
font: "'Arial Black','Arial',sans-serif"
});
moodLabel.anchor.set(0.5, 0);
moodLabel.x = barStartX + barSpacing * 3 + 152;
moodLabel.y = barY + 50;
game.addChild(moodLabel);
var sleepLabel = new Text2('Sleep', {
size: 32,
fill: 0x000000,
font: "'Arial Black','Arial',sans-serif"
});
sleepLabel.anchor.set(0.5, 0);
sleepLabel.x = barStartX + barSpacing * 4 + 152;
sleepLabel.y = barY + 50;
game.addChild(sleepLabel);
// Create cobblestone background
var cobblestoneBackground = game.addChild(LK.getAsset('cobblestone', {
anchorX: 0,
anchorY: 0,
x: 0,
y: 0
}));
// Create floor behind lamp and musician
var floor = game.addChild(LK.getAsset('floor', {
anchorX: 0,
anchorY: 1,
x: 0,
y: 2832 - 150
}));
// Create location reference for current gameplay
var streetCorner = new Location('streetCorner', 'Street Corner', 1.0, 0);
// Create sitting bench at musician's current position
var sittingBench = game.addChild(LK.getAsset('sittingBench', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 2170
}));
// Create musician
var musician = new Musician();
musician.x = 1024; // Center horizontally (2048/2)
musician.y = 2070; // Position musician to sit properly on the bench
game.addChild(musician);
// Scale musician to 1.15x
tween(musician, {
scaleX: 1.15,
scaleY: 1.15
}, {
duration: 500,
easing: tween.easeOut
});
// Create action buttons
var performButton = new ActionButton('Perform ($' + (currentLocation ? currentLocation.cost : 0) + ')', function () {
if (currentLocation && money >= currentLocation.cost) {
performMusic();
}
});
performButton.x = 250;
performButton.y = 800;
game.addChild(performButton);
var eatButton = new ActionButton('Eat ($5)', function () {
if (money >= 5) {
money -= 5;
foodLevel = Math.min(100, foodLevel + 30);
moodLevel = Math.min(100, moodLevel + 10);
updateDisplay();
}
}, 'eatButton');
eatButton.x = 550;
eatButton.y = 800;
game.addChild(eatButton);
var drinkButton = new ActionButton('Drink ($2)', function () {
if (money >= 2) {
money -= 2;
waterLevel = Math.min(100, waterLevel + 40);
updateDisplay();
}
}, 'drinkButton');
drinkButton.x = 850;
drinkButton.y = 800;
game.addChild(drinkButton);
var sleepButton = new ActionButton('Sleep ($10)', function () {
if (money >= 10) {
money -= 10;
sleepLevel = Math.min(100, sleepLevel + 60);
healthLevel = Math.min(100, healthLevel + 10);
moodLevel = Math.min(100, moodLevel + 15);
updateDisplay();
}
}, 'sleepButton');
sleepButton.x = 1150;
sleepButton.y = 800;
game.addChild(sleepButton);
var nextDayButton = new ActionButton('Next Day', function () {
nextDay();
});
nextDayButton.x = 1450;
nextDayButton.y = 800;
game.addChild(nextDayButton);
// Set initial location
currentLocation = streetCorner;
selectLocation(streetCorner);
// Create street lamp
var streetLamp = game.addChild(LK.getAsset('streetLamp', {
anchorX: 0.5,
anchorY: 1,
x: 300,
y: 2632 - 150
}));
// Add lamp light glow effect
var lampGlow = game.addChild(LK.getAsset('lampGlow', {
anchorX: 1.5,
anchorY: 1.5,
x: 400,
y: 2350 - 150 - 230
}));
lampGlow.alpha = 0.3;
function selectLocation(location) {
if (!location.unlocked) {
return;
}
currentLocation = location;
// Update perform button cost
var buttonText = performButton.children[1];
buttonText.setText('Perform ($' + location.cost + ')');
}
function performMusic() {
if (currentLocation && money >= currentLocation.cost && sleepLevel > 20) {
money -= currentLocation.cost;
// Calculate performance quality
var performance = calculatePerformance();
var earnings = Math.floor(performance * currentLocation.earningMultiplier * (5 + Math.random() * 15));
money += earnings;
musicSkill += 1;
sleepLevel = Math.max(0, sleepLevel - 15);
moodLevel = Math.min(100, moodLevel + 5);
// Police encounter chance
if (currentLocation.type === 'streetCorner' && Math.random() < 0.15) {
policeEncounter();
}
// Social media followers (after day 10)
if (currentDay >= 10 && !socialMediaUnlocked) {
socialMediaUnlocked = true;
}
if (socialMediaUnlocked && performance > 0.7) {
var newFollowers = Math.floor(performance * 10 * currentLocation.earningMultiplier);
followers += newFollowers;
}
musician.perform();
LK.getSound('coinDrop').play();
// Show earnings
showEarnings(earnings);
updateDisplay();
checkWinConditions();
}
}
function calculatePerformance() {
var base = musicSkill / 100;
var moodBonus = moodLevel / 100 * 0.3;
var sleepBonus = sleepLevel / 100 * 0.2;
var equipmentBonus = equipmentLevel * 0.1;
return Math.min(1.0, base + moodBonus + sleepBonus + equipmentBonus);
}
function policeEncounter() {
LK.getSound('policeSiren').play();
var officer = game.addChild(LK.getAsset('policeOfficer', {
anchorX: 0.5,
anchorY: 1,
x: musician.x + 100,
y: musician.y
}));
var fine = Math.floor(5 + Math.random() * 15);
money = Math.max(0, money - fine);
moodLevel = Math.max(0, moodLevel - 20);
LK.setTimeout(function () {
officer.destroy();
}, 2000);
updateDisplay();
}
function showEarnings(amount) {
var earningsText = new Text2('+$' + amount, {
size: 30,
fill: 0x00FF00
});
earningsText.anchor.set(0.5, 0.5);
earningsText.x = musician.x;
earningsText.y = musician.y - 150;
game.addChild(earningsText);
tween(earningsText, {
y: earningsText.y - 50,
alpha: 0
}, {
duration: 1500,
onFinish: function onFinish() {
earningsText.destroy();
}
});
}
function nextDay() {
currentDay++;
// Daily resource drain
foodLevel = Math.max(0, foodLevel - 10);
waterLevel = Math.max(0, waterLevel - 10);
// Health effects
if (foodLevel < 20) {
healthLevel = Math.max(0, healthLevel - 15);
moodLevel = Math.max(0, moodLevel - 10);
}
if (waterLevel < 20) {
healthLevel = Math.max(0, healthLevel - 10);
}
if (sleepLevel < 30) {
healthLevel = Math.max(0, healthLevel - 5);
moodLevel = Math.max(0, moodLevel - 15);
}
// Random events
if (Math.random() < 0.2) {
randomEvent();
}
updateDisplay();
checkGameOver();
checkWinConditions();
}
function randomEvent() {
var events = [{
text: "A generous fan gave you $20!",
effect: function effect() {
money += 20;
}
}, {
text: "Rain ruined your guitar strings. -$10",
effect: function effect() {
money = Math.max(0, money - 10);
}
}, {
text: "You met a music producer!",
effect: function effect() {
if (musicSkill >= 70) {
concerts++;
money += 100;
}
}
}];
var event = events[Math.floor(Math.random() * events.length)];
event.effect();
var eventText = new Text2(event.text, {
size: 25,
fill: 0xFFFF00
});
eventText.anchor.set(0.5, 0.5);
eventText.x = 1024;
eventText.y = 1000;
game.addChild(eventText);
tween(eventText, {
alpha: 0
}, {
duration: 3000,
onFinish: function onFinish() {
eventText.destroy();
}
});
}
function updateDisplay() {
dayText.setText('Day ' + currentDay);
moneyText.setText('$' + money);
followersText.setText('Followers: ' + followers);
foodBar.setValue(foodLevel);
waterBar.setValue(waterLevel);
healthBar.setValue(healthLevel);
moodBar.setValue(moodLevel);
sleepBar.setValue(sleepLevel);
}
function checkGameOver() {
if (healthLevel <= 0) {
gamePhase = 'gameOver';
LK.showGameOver();
} else if (moodLevel <= 0) {
gamePhase = 'gameOver';
LK.showGameOver();
} else if (currentDay > 30) {
if (concerts < 3 || followers < 1000) {
gamePhase = 'gameOver';
LK.showGameOver();
}
}
}
function checkWinConditions() {
if (concerts >= 3 && followers >= 1000 && currentDay <= 30) {
gamePhase = 'won';
LK.showYouWin();
}
}
// Game screens management
var currentScreen = 'main';
var allGameElements = [];
// Store all main game elements for hiding/showing
// Note: floor (cobblestone) is not included as it should remain visible as background
allGameElements.push(sittingBench);
allGameElements.push(performButton, eatButton, drinkButton, sleepButton, nextDayButton);
allGameElements.push(foodBar, waterBar, healthBar, moodBar, sleepBar);
allGameElements.push(foodLabel, waterLabel, healthLabel, moodLabel, sleepLabel);
allGameElements.push(streetLamp, lampGlow);
allGameElements.push(musician);
// Create collapsible navigation window
var navWindow = new CollapsibleWindow();
navWindow.x = 2048; // Position at right edge
navWindow.y = 1466; // Center vertically
game.addChild(navWindow);
// Add navigation buttons to collapsible window with proper spacing relative to background
var buttonSpacing = 200;
var startY = -300;
var streetNavButton = navWindow.addNavButton('STREET CORNER', 'main', 'streetCornerNav', startY);
var marketNavButton = navWindow.addNavButton('MARKET', 'market', 'market', startY + buttonSpacing);
var hotelNavButton = navWindow.addNavButton('HOTEL', 'hotel', 'hotel', startY + buttonSpacing * 2);
var studioNavButton = navWindow.addNavButton('STUDIO', 'studio', 'studioNav', startY + buttonSpacing * 3);
// Market screen elements
var marketElements = [];
var marketTitle = new Text2('MARKET', {
size: 80,
fill: 0x000000,
font: "'Arial Black','Arial',sans-serif"
});
marketTitle.anchor.set(0.5, 0.5);
marketTitle.x = 1024;
marketTitle.y = 400;
marketElements.push(marketTitle);
// Hotel screen elements
var hotelElements = [];
var hotelTitle = new Text2('HOTEL', {
size: 80,
fill: 0x000000,
font: "'Arial Black','Arial',sans-serif"
});
hotelTitle.anchor.set(0.5, 0.5);
hotelTitle.x = 1024;
hotelTitle.y = 400;
hotelElements.push(hotelTitle);
// Studio screen elements
var studioElements = [];
var studioTitle = new Text2('STUDIO', {
size: 80,
fill: 0x000000,
font: "'Arial Black','Arial',sans-serif"
});
studioTitle.anchor.set(0.5, 0.5);
studioTitle.x = 1024;
studioTitle.y = 400;
studioElements.push(studioTitle);
function navigateToLocation(targetLocation) {
// Hide all current screen elements
hideCurrentScreenElements();
// Navigation buttons visibility handled by collapsible window
currentScreen = targetLocation;
if (targetLocation === 'main') {
// Show main game elements
for (var i = 0; i < allGameElements.length; i++) {
allGameElements[i].visible = true;
}
} else if (targetLocation === 'market') {
// Show market elements
for (var i = 0; i < marketElements.length; i++) {
if (!marketElements[i].parent) {
game.addChild(marketElements[i]);
}
marketElements[i].visible = true;
}
} else if (targetLocation === 'hotel') {
// Show hotel elements
for (var i = 0; i < hotelElements.length; i++) {
if (!hotelElements[i].parent) {
game.addChild(hotelElements[i]);
}
hotelElements[i].visible = true;
}
} else if (targetLocation === 'studio') {
// Show studio elements
for (var i = 0; i < studioElements.length; i++) {
if (!studioElements[i].parent) {
game.addChild(studioElements[i]);
}
studioElements[i].visible = true;
}
}
}
function hideCurrentScreenElements() {
// Hide main game elements
for (var i = 0; i < allGameElements.length; i++) {
allGameElements[i].visible = false;
}
// Hide market elements
for (var i = 0; i < marketElements.length; i++) {
marketElements[i].visible = false;
}
// Hide hotel elements
for (var i = 0; i < hotelElements.length; i++) {
hotelElements[i].visible = false;
}
// Hide studio elements
for (var i = 0; i < studioElements.length; i++) {
studioElements[i].visible = false;
}
}
// Initialize display
updateDisplay();
game.update = function () {
// Game runs at 60fps, update logic here if needed
}; ===================================================================
--- original.js
+++ change.js
@@ -161,59 +161,41 @@
anchorY: 0,
x: 110,
y: -125
});
- // Add left thigh attached to lower body
- var leftThigh = lowerBody.attachAsset('musicianThigh', {
+ // Add left calf attached directly to lower body
+ var leftCalf = lowerBody.attachAsset('musicianCalf', {
anchorX: 0.5,
anchorY: 0,
x: -25,
y: 20,
- rotation: 0.6
+ rotation: -0.8
// Angled downward for sitting position
});
- // Add left calf attached to thigh at knee
- var leftCalf = leftThigh.attachAsset('musicianCalf', {
- anchorX: 0.5,
- anchorY: 0,
- x: 0,
- y: 100,
- rotation: -1.4
- // Bent at knee for realistic sitting
- });
// Add left foot attached to calf at ankle
var leftFoot = leftCalf.attachAsset('musicianFoot', {
anchorX: 0.5,
anchorY: 0,
x: 0,
- y: 80,
+ y: 95,
rotation: 0.8
// Angled for natural foot position
});
- // Add right thigh attached to lower body
- var rightThigh = lowerBody.attachAsset('musicianThigh', {
+ // Add right calf attached directly to lower body
+ var rightCalf = lowerBody.attachAsset('musicianCalf', {
anchorX: 0.5,
anchorY: 0,
x: 25,
y: 20,
- rotation: 0.6
+ rotation: -0.8
// Angled downward for sitting position
});
- // Add right calf attached to thigh at knee
- var rightCalf = rightThigh.attachAsset('musicianCalf', {
- anchorX: 0.5,
- anchorY: 0,
- x: 0,
- y: 100,
- rotation: -1.4
- // Bent at knee for realistic sitting
- });
// Add right foot attached to calf at ankle
var rightFoot = rightCalf.attachAsset('musicianFoot', {
anchorX: 0.5,
anchorY: 0,
x: 0,
- y: 80,
+ y: 95,
rotation: 0.8
// Angled for natural foot position
});
// Add left hand positioned at the end of left arm
pixel yatak. In-Game asset. 2d. High contrast. No shadows
pixel
Market pixel. In-Game asset. 2d. High contrast. No shadows
hotel pixel. In-Game asset. 2d. High contrast. No shadows
sokak lambası kaldırım ve bank pixel. In-Game asset. 2d. High contrast. No shadows
Music studio pixel. In-Game asset. 2d. High contrast. No shadows
water pixel. In-Game asset. 2d. High contrast. No shadows
Navigation pixel. In-Game asset. 2d. High contrast. No shadows
pixel phone frame. In-Game asset. 2d. High contrast. No shadows
street lamp pixel. In-Game asset. 2d. High contrast. No shadows
make pixels
sitting bench pixels. In-Game asset. 2d. High contrast. No shadows
clock face. no clock hour stick and minute stick only the clock face In-Game asset. 2d. High contrast. No shadows
DİRTY AND BROKE guitar pixel. dik dursun In-Game asset. 2d. High contrast. No shadows
same picture but night
same picture but morning
same picture noon time pixel
police officer pixel. detaylı surat full body In-Game asset. 2d. High contrast. No shadows
same picture but evening