|
@@ -45,16 +45,16 @@ const shelfSlots = [
|
|
{ "position": new THREE.Vector3(-3.5, 1.5, -3.5), "motionPath": [{ x: -3, y: 1.3, z: -3.5 }, { x: -1.5, y: 2, z: 0 }, { x: -0.5, y: 2, z: 0 }, { x: 0, y: 0.5, z: 0 }] },
|
|
{ "position": new THREE.Vector3(-3.5, 1.5, -3.5), "motionPath": [{ x: -3, y: 1.3, z: -3.5 }, { x: -1.5, y: 2, z: 0 }, { x: -0.5, y: 2, z: 0 }, { x: 0, y: 0.5, z: 0 }] },
|
|
{ "position": new THREE.Vector3(-4.5, 1.5, -3.5), "motionPath": [{ x: -3, y: 1.3, z: -3.5 }, { x: -1.5, y: 2, z: 0 }, { x: -0.5, y: 2, z: 0 }, { x: 0, y: 0.5, z: 0 }] },
|
|
{ "position": new THREE.Vector3(-4.5, 1.5, -3.5), "motionPath": [{ x: -3, y: 1.3, z: -3.5 }, { x: -1.5, y: 2, z: 0 }, { x: -0.5, y: 2, z: 0 }, { x: 0, y: 0.5, z: 0 }] },
|
|
{ "position": new THREE.Vector3(-4.5, 0, -3.0), "motionPath": [{ x: -3, y: 1.3, z: -3.5 }, { x: -1.5, y: 2, z: 0 }, { x: -0.5, y: 2, z: 0 }, { x: 0, y: 0.5, z: 0 }] },
|
|
{ "position": new THREE.Vector3(-4.5, 0, -3.0), "motionPath": [{ x: -3, y: 1.3, z: -3.5 }, { x: -1.5, y: 2, z: 0 }, { x: -0.5, y: 2, z: 0 }, { x: 0, y: 0.5, z: 0 }] },
|
|
- { "position": new THREE.Vector3(-4.5, 3, -3.5), "motionPath": [{ x: -3, y: 1.3, z: -3.5 }, { x: -1.5, y: 2, z: 0 }, { x: -0.5, y: 2, z: 0 }, { x: 0, y: 0.5, z: 0 }] }
|
|
|
|
|
|
+ { "position": new THREE.Vector3(-3.3, 3, -3.5), "motionPath": [{ x: -3, y: 1.3, z: -3.5 }, { x: -1.5, y: 2, z: 0 }, { x: -0.5, y: 2, z: 0 }, { x: 0, y: 0.5, z: 0 }] }
|
|
]
|
|
]
|
|
|
|
|
|
const storeShelfSlots = [
|
|
const storeShelfSlots = [
|
|
- { "position": new THREE.Vector3(-12.5, 2.75, -3.25), "motionPath": [] },
|
|
|
|
- { "position": new THREE.Vector3(-11.5, 2.75, -3.25), "motionPath": [] },
|
|
|
|
- { "position": new THREE.Vector3(-8.5, 2.75, -3.25), "motionPath": [] },
|
|
|
|
- { "position": new THREE.Vector3(-7.5, 2.75, -3.25), "motionPath": [] },
|
|
|
|
- { "position": new THREE.Vector3(-8.5, 1.25, -3.25), "motionPath": [] },
|
|
|
|
- { "position": new THREE.Vector3(-7.5, 1.25, -3.25), "motionPath": [] },
|
|
|
|
|
|
+ { "position": new THREE.Vector3(-12.5, 2.75, -3.25), "motionPath": [{ x: -11.5, y: 2.75, z: -3.25 }, { x: -12, y: 2, z: -2 }, { x: -13, y: 0.75, z: 2.5 }] },
|
|
|
|
+ { "position": new THREE.Vector3(-11.5, 2.75, -3.25), "motionPath": [{ x: -11.5, y: 2.75, z: -3.25 }, { x: -12, y: 2, z: -2 }, { x: -13, y: 0.75, z: 2.5 }] },
|
|
|
|
+ { "position": new THREE.Vector3(-8.5, 2.75, -3.25), "motionPath": [{ x: -11.5, y: 2.75, z: -3.25 }, { x: -12, y: 2, z: -2 }, { x: -13, y: 0.75, z: 2.5 }] },
|
|
|
|
+ { "position": new THREE.Vector3(-7.5, 2.75, -3.25), "motionPath": [{ x: -11.5, y: 2.75, z: -3.25 }, { x: -12, y: 2, z: -2 }, { x: -13, y: 0.75, z: 2.5 }] },
|
|
|
|
+ { "position": new THREE.Vector3(-8.5, 1.25, -3.25), "motionPath": [{ x: -11.5, y: 2.75, z: -3.25 }, { x: -12, y: 2, z: -2 }, { x: -13, y: 0.75, z: 2.5 }] },
|
|
|
|
+ { "position": new THREE.Vector3(-7.5, 1.25, -3.25), "motionPath": [{ x: -11.5, y: 2.75, z: -3.25 }, { x: -12, y: 2, z: -2 }, { x: -13, y: 0.75, z: 2.5 }] },
|
|
]
|
|
]
|
|
|
|
|
|
const customerSlots = [
|
|
const customerSlots = [
|
|
@@ -234,7 +234,6 @@ export function addValueToSave(container, key, value) {
|
|
|
|
|
|
export function addAmountToSave(key, value) {
|
|
export function addAmountToSave(key, value) {
|
|
let amount = parseInt(localStorage.getItem(`${GAME_SAVE_KEY}-${key}`)) ?? 0
|
|
let amount = parseInt(localStorage.getItem(`${GAME_SAVE_KEY}-${key}`)) ?? 0
|
|
- console.log('reading from save', amount)
|
|
|
|
amount += value
|
|
amount += value
|
|
|
|
|
|
localStorage.setItem(`${GAME_SAVE_KEY}-${key}`, amount)
|
|
localStorage.setItem(`${GAME_SAVE_KEY}-${key}`, amount)
|
|
@@ -381,7 +380,8 @@ export async function init(inGame) {
|
|
})
|
|
})
|
|
|
|
|
|
stageData.candycorn = await loadGltf(game, 'models/candycorn.gltf')
|
|
stageData.candycorn = await loadGltf(game, 'models/candycorn.gltf')
|
|
- stageData.candycorn.position.x = -3.3
|
|
|
|
|
|
+
|
|
|
|
+ stageData.candycorn.position.x = -4.5
|
|
stageData.candycorn.position.z = -3.5
|
|
stageData.candycorn.position.z = -3.5
|
|
game.scene.add(stageData.candycorn)
|
|
game.scene.add(stageData.candycorn)
|
|
|
|
|
|
@@ -951,7 +951,6 @@ export function onClick() {
|
|
updatePotionShelfDisplay()
|
|
updatePotionShelfDisplay()
|
|
firstCustomer.acceptPotion()
|
|
firstCustomer.acceptPotion()
|
|
stageData.soundEffects['audio/cash-register.ogg'].play()
|
|
stageData.soundEffects['audio/cash-register.ogg'].play()
|
|
- console.log(`getting money: ${potion.potionData.value}`)
|
|
|
|
stageData.currency = addAmountToSave("currency", potion.potionData.value)
|
|
stageData.currency = addAmountToSave("currency", potion.potionData.value)
|
|
updateGameStatusUI(game, stageData)
|
|
updateGameStatusUI(game, stageData)
|
|
//move money from customer to chest
|
|
//move money from customer to chest
|