/**** * Plugins ****/ var storage = LK.import("@upit/storage.v1"); var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var ManualAnimation = Container.expand(function (options) { var self = Container.call(this); options = options || {}; self.frames = options.frames || []; self.frameDuration = options.frameDuration || 80; self.loop = options.loop !== undefined ? options.loop : true; self.currentFrame = 0; self.intervalId = null; self.playing = false; self.onComplete = options.onComplete || null; self.anchor = { set: function set(x, y) { if (!self.pivot) { self.pivot = {}; } self.pivot.x = 850 * x; self.pivot.y = 200 * y; } }; if (options.x !== undefined) { self.x = options.x; } if (options.y !== undefined) { self.y = options.y; } var setFrame = function setFrame(frameIndex) { console.log(">> setFrame: Ustawiam klatke na indeks: " + frameIndex); self.removeChildren(); var frame = self.frames[frameIndex]; if (frame) { if (typeof currentEyeColor !== 'undefined') { var newTint = (Math.floor(currentEyeColor.r) << 16) + (Math.floor(currentEyeColor.g) << 8) + Math.floor(currentEyeColor.b); frame.tint = newTint; } self.addChild(frame); } }; self.gotoFrame = function (frameIndex) { console.log(">> gotoFrame: Przechodze do klatki: " + frameIndex); if (frameIndex >= 0 && frameIndex < self.frames.length) { self.currentFrame = frameIndex; setFrame(self.currentFrame); } }; self.play = function () { console.log(">> play: START. Klatka: " + self.currentFrame + ", playing: " + self.playing + ", klatek w sekwencji: " + self.frames.length); if (self.playing || self.frames.length === 0) { return; } self.playing = true; setFrame(self.currentFrame); self.intervalId = LK.setInterval(function () { if (!self.playing || self.destroyed) { LK.clearInterval(self.intervalId); return; } self.currentFrame++; if (self.currentFrame >= self.frames.length) { if (self.loop) { self.currentFrame = 0; } else { console.log(">> play: Animacja ukonczona, onComplete zaraz sie odpali. Zatrzyuje interwal."); self.playing = false; LK.clearInterval(self.intervalId); if (self.onComplete) { self.onComplete(); } return; } } setFrame(self.currentFrame); }, self.frameDuration); }; self.stop = function () { console.log(">> stop: STOP. Klatka: " + self.currentFrame + ", playing: " + self.playing); self.playing = false; if (self.intervalId) { LK.clearInterval(self.intervalId); self.intervalId = null; } }; var originalDestroy = self.destroy; self.destroy = function () { self.stop(); if (originalDestroy) { originalDestroy.call(self); } }; return self; }); var Note = Container.expand(function (noteType, swipeDir, targetHitTimeFull, centerXVal, noteColumnIndex, isIncomingBuffNote, incomingBuffType, holdDurationMs) { var self = Container.call(this); self.noteColumnIndex = noteColumnIndex; self.noteType = noteType || 'tap'; self.swipeDir = swipeDir || null; self.targetHitTime = targetHitTimeFull; self.visualSpawnTime = self.targetHitTime - noteTravelTime; self.hit = false; self.judged = false; self.scaleStart = 1.0; self.scaleEnd = 1.0; self.centerX = centerXVal; self.centerY = 1800; self.startY = -150; self.noteAsset = null; self.brightnessOverlay = null; self.isWiderSwipePart = false; self.isBuffNote = isIncomingBuffNote || false; self.buffType = incomingBuffType || null; self.isHoldNote = self.noteType === 'hold'; self.holdDuration = self.isHoldNote ? holdDurationMs || 1000 : 0; self.holdPressTime = 0; self.isBeingHeld = false; self.holdFullyCompleted = false; self.holdBroken = false; self.initialHoldHeight = 0; self.feedbackShownForBroken = false; self.holdButton = null; self.yOffset = 0; if (self.isBuffNote) { var buffAssetKey = ''; if (self.buffType === 'potion') { buffAssetKey = 'hpPotionAsset'; } else if (self.buffType === 'shield') { buffAssetKey = 'shieldAsset'; } else if (self.buffType === 'precision') { buffAssetKey = 'precisionAsset'; } if (buffAssetKey) { self.noteAsset = self.attachAsset(buffAssetKey, { anchorX: 0.5, anchorY: 0.5, width: 400, height: 400 }); } if (self.isBuffNote) { self.noteType = 'tap'; self.isHoldNote = false; } } else if (self.isHoldNote) { var pixelsPerMs = (self.centerY - self.startY) / noteTravelTime; var calculatedTotalHeight = Math.max(50, self.holdDuration * pixelsPerMs); self.initialHoldHeight = calculatedTotalHeight; var holdAssetKey = 'hold'; var calculatedYOffset; if (noteColumnIndex === 1) { holdAssetKey = 'hold1'; calculatedYOffset = 135; } else if (noteColumnIndex === 2) { holdAssetKey = 'hold2'; calculatedYOffset = 225; } else { holdAssetKey = 'hold'; calculatedYOffset = 185; } self.yOffset = calculatedYOffset; self.noteAsset = self.attachAsset(holdAssetKey, { anchorX: 0.5, anchorY: 1, y: self.yOffset, height: self.initialHoldHeight }); var holdButtonAssetKey; if (noteColumnIndex === 0) { holdButtonAssetKey = 'holdButtonAsset_col0'; } else if (noteColumnIndex === 1) { holdButtonAssetKey = 'holdButtonAsset_col1'; } else { holdButtonAssetKey = 'holdButtonAsset_col2'; } self.holdButton = self.attachAsset(holdButtonAssetKey, { anchorX: 0.5, anchorY: 1, y: self.yOffset, interactive: true, cursor: "pointer" }); self.brightnessOverlay = self.attachAsset('brightnessOverlayAsset', { anchorX: 0.5, anchorY: 0.5, x: 0, y: self.yOffset, width: 200, height: 200, alpha: 0, visible: true }); } else { if (self.noteType === 'tap') { var tapAssetKey = 'tap0'; if (noteColumnIndex !== undefined) { if (noteColumnIndex === 0) { tapAssetKey = 'tap0'; } else if (noteColumnIndex === 1) { tapAssetKey = 'tap1'; } else if (noteColumnIndex === 2) { tapAssetKey = 'tap2'; } } self.noteAsset = self.attachAsset(tapAssetKey, { anchorX: 0.5, anchorY: 0.5 }); self.noteAsset.scaleX = 1.3; self.noteAsset.scaleY = 1.3; } else if (self.noteType === 'swipe') { var swipeAssetKey = 'swipe_col0'; if (noteColumnIndex !== undefined) { if (noteColumnIndex === 0) { swipeAssetKey = 'swipe_col0'; } else if (noteColumnIndex === 1) { swipeAssetKey = 'swipe_col1'; } else if (noteColumnIndex === 2) { swipeAssetKey = 'swipe_col2'; } } self.noteAsset = self.attachAsset(swipeAssetKey, { anchorX: 0.5, anchorY: 0.5 }); if (self.swipeDir && self.noteAsset) { var rotationAngle = 0; if (self.swipeDir === 'left') { rotationAngle = Math.PI; } else if (self.swipeDir === 'right') { rotationAngle = 0; } else if (self.swipeDir === 'up') { rotationAngle = -Math.PI / 2; } else if (self.swipeDir === 'down') { rotationAngle = Math.PI / 2; } self.noteAsset.rotation = rotationAngle; } } else if (self.noteType === 'trap') { self.noteAsset = self.attachAsset('trapNote', { anchorX: 0.5, anchorY: 0.5 }); } } self.alpha = 0; if (typeof DEBUG_SHOW_HITBOXES !== 'undefined' && DEBUG_SHOW_HITBOXES) { self.debugHitboxVisual = self.attachAsset('debugHitboxAsset', { anchorX: 0.5, anchorY: 0.5, alpha: 0.35, visible: false }); } self.showHitFeedback = function (result, feedbackTextOverride) { var feedbackCircle = LK.getAsset('hitFeedback', { anchorX: 0.5, anchorY: 0.5, x: 0, y: self.yOffset, scaleX: 0.7, scaleY: 0.7, alpha: 0.7 }); if (self.isHoldNote) { feedbackCircle.x = 0; } else if (self.noteAsset && self.noteAsset.anchorY === 0) { feedbackCircle.y = self.noteAsset.height / 2; } else if (self.noteAsset && self.noteAsset.anchorY === 0.5) { feedbackCircle.x = 0; feedbackCircle.y = 0; } var feedbackTextContent = feedbackTextOverride || ""; var feedbackTextColor = 0xFFFFFF; if (!feedbackTextOverride) { if (self.isBuffNote && result !== 'miss') { feedbackCircle.tint = 0x40E0D0; feedbackTextContent = self.buffType.charAt(0).toUpperCase() + self.buffType.slice(1) + "!"; feedbackTextColor = 0x40E0D0; } else if (result === 'perfect') { feedbackCircle.tint = 0xffff00; feedbackTextContent = "Perfect!"; feedbackTextColor = 0xffff00; } else if (result === 'good') { feedbackCircle.tint = 0x00ff00; feedbackTextContent = "Good!"; feedbackTextColor = 0x00ff00; } else if (result === 'hold_ok') { feedbackCircle.tint = 0x00FF7F; feedbackTextContent = "Held!"; feedbackTextColor = 0x00FF7F; } else { feedbackCircle.tint = 0xff0000; feedbackTextContent = result === 'hold_broken' ? "Broken!" : "Miss"; feedbackTextColor = 0xff0000; } } self.addChild(feedbackCircle); tween(feedbackCircle, { alpha: 0, scaleX: 1.5, scaleY: 1.5 }, { duration: 350, easing: tween.easeOut, onFinish: function onFinish() { if (feedbackCircle.parent) { feedbackCircle.destroy(); } } }); if (feedbackTextContent) { var scorePopup = new Text2(feedbackTextContent, { size: 60, fill: feedbackTextColor, stroke: 0x000000, strokeThickness: 3 }); scorePopup.anchor.set(0.5, 0.5); var initialYPopup; var noteVisualHeightForFeedback = self.noteAsset ? self.noteAsset.height : SWIPE_NOTE_WIDTH; if (self.isHoldNote && self.noteAsset) { initialYPopup = self.y - self.noteAsset.width * 0.25 - 30; } else if (self.noteAsset && self.noteAsset.anchorY === 0.5) { initialYPopup = self.y - noteVisualHeightForFeedback / 2 - 30; } else { initialYPopup = self.y - 30; } scorePopup.x = self.x; scorePopup.y = initialYPopup; if (self.parent) { self.parent.addChild(scorePopup); tween(scorePopup, { y: initialYPopup - 80, alpha: 0 }, { duration: 700, easing: tween.easeOut, onFinish: function onFinish() { if (scorePopup.parent) { scorePopup.destroy(); } } }); } } if (self.parent && (result === 'good' || result === 'perfect' || result === 'hold_ok')) { var particleSpawnX = self.x; var particleSpawnY; if (self.isHoldNote && self.noteAsset) { particleSpawnY = self.y - self.noteAsset.width * 0.25; } else if (self.noteAsset && self.noteAsset.anchorY === 0.5) { particleSpawnY = self.y; } else if (self.noteAsset) { particleSpawnY = self.y + self.noteAsset.height / 2; } else { particleSpawnY = self.y; } spawnParticleEffect(particleSpawnX, particleSpawnY, result, self.parent); } }; self.update = function () { var now = Date.now(); if (!self.judged && isFinalBossActive && autoplayColumns[self.noteColumnIndex] && self.noteType !== 'trap') { if (now >= self.targetHitTime - 16) { self.judged = true; var result = 'perfect'; if (self.isHoldNote) { self.showHitFeedback('hold_ok', 'Auto-Held!'); addScore(result); } else { self.showHitFeedback(result, 'Auto!'); addScore(result); } addCombo(); flashColumn(self.noteColumnIndex); if (!isTutorialMode && !gameOverFlag) { bossCurrentHP = Math.max(0, bossCurrentHP - 2); updateBossHpDisplay(); } self.alpha = 0; return; } } if (self.judged) { if (self.alpha > 0) { self.alpha = 0; } if (self.brightnessOverlay) { self.brightnessOverlay.alpha = 0; } if (typeof DEBUG_SHOW_HITBOXES !== 'undefined' && DEBUG_SHOW_HITBOXES && self.debugHitboxVisual) { self.debugHitboxVisual.visible = false; } return; } if (self.alpha === 0 && now >= self.visualSpawnTime) { self.alpha = 1; } if (self.alpha === 0) { return; } if (self.isHoldNote && self.isBeingHeld) { if (self.holdBroken) { self.isBeingHeld = false; self.judged = true; if (self.brightnessOverlay) { self.brightnessOverlay.alpha = 0; } if (!self.feedbackShownForBroken) { self.showHitFeedback('hold_broken'); self.feedbackShownForBroken = true; } return; } if (self.noteAsset) { if (now >= self.targetHitTime) { var timeHeldPastHitLine = now - self.targetHitTime; var pixelsPerMs = (self.centerY - self.startY) / noteTravelTime; var pixelsConsumed = Math.min(timeHeldPastHitLine * pixelsPerMs, self.initialHoldHeight); self.noteAsset.height = Math.max(0, self.initialHoldHeight - pixelsConsumed); } else { self.noteAsset.height = self.initialHoldHeight; } } if (self.brightnessOverlay && !self.holdBroken) {} if (now >= self.targetHitTime + self.holdDuration && !self.holdFullyCompleted) { self.holdFullyCompleted = true; } var progressHold = (now - self.visualSpawnTime) / noteTravelTime; var newYHold = self.startY + (self.centerY - self.startY) * progressHold; if (newYHold >= self.centerY || self.y === self.centerY) { self.y = self.centerY; } else { self.y = newYHold; } self.x = self.centerX; if (typeof DEBUG_SHOW_HITBOXES !== 'undefined' && DEBUG_SHOW_HITBOXES && self.debugHitboxVisual && self.alpha > 0) { var hitboxHeight = 250; self.debugHitboxVisual.visible = true; self.debugHitboxVisual.width = 250; self.debugHitboxVisual.height = hitboxHeight; self.debugHitboxVisual.x = 0; self.debugHitboxVisual.y = self.yOffset - hitboxHeight / 2; } return; } else if (self.isHoldNote && self.brightnessOverlay) { self.brightnessOverlay.alpha = 0; } var progress = (now - self.visualSpawnTime) / noteTravelTime; self.y = self.startY + (self.centerY - self.startY) * progress; self.x = self.centerX; if (!self.judged) { var currentTime = Date.now(); if (self.isHoldNote && self.holdPressTime === 0) { if (currentTime > self.targetHitTime + hitWindowGood + ADDITIONAL_HOLD_MISS_DELAY) { self.judged = true; self.showHitFeedback('miss'); if (!isTutorialMode && !isShieldActive) { resetCombo(); } } } else if (self.noteType !== 'trap' && !self.isHoldNote) { if (currentTime > self.targetHitTime + hitWindowGood) { self.judged = true; if (self.isBuffNote) { self.showHitFeedback('miss'); if (!isTutorialMode && !isShieldActive) { resetCombo(); } } else { game.onNoteMiss(self); } } } } if (typeof DEBUG_SHOW_HITBOXES !== 'undefined' && DEBUG_SHOW_HITBOXES && self.debugHitboxVisual) { if (self.alpha > 0 && !self.judged) { var hitboxWidth, hitboxHeight; var spatialBuffMultiplier = typeof isPrecisionBuffActive !== 'undefined' && isPrecisionBuffActive ? 1.5 : 1.0; if (self.noteAsset) { hitboxWidth = self.noteAsset.width * self.scale.x; hitboxHeight = self.noteAsset.height * self.scale.y; self.debugHitboxVisual.y = 0; } else { hitboxWidth = 0; hitboxHeight = 0; } self.debugHitboxVisual.width = hitboxWidth * spatialBuffMultiplier; self.debugHitboxVisual.height = hitboxHeight * spatialBuffMultiplier; self.debugHitboxVisual.x = 0; self.debugHitboxVisual.visible = true; } else { self.debugHitboxVisual.visible = false; } } }; self.isInHitWindow = function () { var now = Date.now(); var dt = Math.abs(now - self.targetHitTime); return dt <= hitWindowGood; }; self.getHitAccuracy = function () { var now = Date.now(); var dt = Math.abs(now - self.targetHitTime); if (dt <= hitWindowPerfect) { return 'perfect'; } if (dt <= hitWindowGood) { return 'good'; } return 'miss'; }; self.judgeHoldRelease = function () { if (self.brightnessOverlay) { self.brightnessOverlay.alpha = 0; } if (!self.isHoldNote || self.judged && self.holdFullyCompleted && !self.holdBroken) { if (self.isBeingHeld) { self.isBeingHeld = false; } return; } var now = Date.now(); self.isBeingHeld = false; self.judged = true; if (self.holdBroken) { if (!self.feedbackShownForBroken) { self.showHitFeedback('hold_broken'); self.feedbackShownForBroken = true; } if (!isTutorialMode && !isShieldActive) { resetCombo(); } if (self.alpha > 0) { self.alpha = 0; } if (self.noteColumnIndex !== undefined) { if (!isFinalBossActive) { var overlay = columnFlashOverlays[self.noteColumnIndex]; if (overlay) { tween(overlay, { alpha: 0 }, { duration: 150, easing: tween.easeOutQuad }); } } } return; } var requiredHoldTimeOnScreen = self.targetHitTime + self.holdDuration; if (now >= requiredHoldTimeOnScreen - hitWindowGood) { self.holdFullyCompleted = true; self.showHitFeedback('hold_ok'); if (!isTutorialMode) { addScore('perfect'); addCombo(); if (!gameOverFlag) { bossCurrentHP = Math.max(0, bossCurrentHP - 2); updateBossHpDisplay(); } } } else { self.showHitFeedback('miss', 'Too Early!'); if (!isTutorialMode && !isShieldActive) { resetCombo(); } } if (self.alpha > 0) { self.alpha = 0; } if (self.noteColumnIndex !== undefined) { if (!isFinalBossActive) { var overlay = columnFlashOverlays[self.noteColumnIndex]; if (overlay) { tween(overlay, { alpha: 0 }, { duration: 150, easing: tween.easeOutQuad }); } } } }; return self; }); var SpriteAnimation = Container.expand(function (options) { var self = Container.call(this); options = options || {}; self.frames = options.frames || []; self.frameDuration = options.frameDuration || 120; self.loop = options.loop !== undefined ? options.loop : true; self.currentFrame = 0; self.frameTimer = 0; self.playing = true; self.alpha = options.alpha !== undefined ? options.alpha : 1; if (options.x !== undefined) { self.x = options.x; } if (options.y !== undefined) { self.y = options.y; } if (options.anchorX !== undefined || options.anchorY !== undefined) { var anchorX = options.anchorX !== undefined ? options.anchorX : 0; var anchorY = options.anchorY !== undefined ? options.anchorY : 0; self.frames.forEach(function (frame) { if (frame && frame.anchor) { frame.anchor.set(anchorX, anchorY); } }); } if (self.frames.length > 0) { self.removeChildren(); var firstFrame = self.frames[self.currentFrame]; if (firstFrame && firstFrame.anchor) { firstFrame.anchor.set(options.anchorX || 0, options.anchorY || 0); } if (firstFrame) { firstFrame.alpha = self.alpha; } self.addChild(firstFrame); } self.update = function () { if (!self.playing || self.frames.length === 0) { return; } self.frameTimer++; if (self.frameTimer >= self.frameDuration / (1000 / 60)) { self.frameTimer = 0; if (self.children.length > 0) { self.removeChild(self.children[0]); } self.currentFrame++; if (self.currentFrame >= self.frames.length) { if (self.loop) { self.currentFrame = 0; var nextFrame = self.frames[self.currentFrame]; if (nextFrame) { nextFrame.alpha = self.alpha; } self.addChild(nextFrame); } else { self.playing = false; if (typeof self.onComplete === 'function') { self.onComplete(); } return; } } else { var nextFrame = self.frames[self.currentFrame]; if (nextFrame) { nextFrame.alpha = self.alpha; } self.addChild(nextFrame); } } }; self.stop = function () { self.playing = false; }; self.play = function () { self.playing = true; }; self.gotoFrame = function (frameIndex) { if (frameIndex >= 0 && frameIndex < self.frames.length) { self.removeChildren(); self.currentFrame = frameIndex; self.addChild(self.frames[self.currentFrame]); } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x181828 }); /**** * Game Code ****/ // np. fioletowy box // np. pomarańczowy/żółty box // Złoty segment ogona (wysokość bazowa) // Pomarańczowa główka // np. węższa środkowa // Placeholder strzałki 1; function _typeof6(o) { "@babel/helpers - typeof"; return _typeof6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof6(o); } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof6(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof6(t) || !t) { return t; } var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof6(i)) { return i; } throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } var noteStreamStarted = false; var lastNoteGenerationTime = 0; var currentScreenState = ''; var columnFlashOverlays = [null, null, null]; var mainMenuScreenElements = []; var DEBUG_SHOW_HITBOXES = false; var isTutorialMode = false; var HOLD_HITBOX_WIDTH = 250; var HOLD_HITBOX_HEIGHT = 250; var currentlyHeldNotes = {}; var tutorialSongData = { id: "TutorialTrack", title: "How to Play", artist: "Game System", musicAsset: "tutorial", bossAssetKey: null, config: { playerMaxHP: 10, bossMaxHP: 1 }, rawRhythmMap: [{ time: 12000, type: "tap", columnIndex: 0 }, { time: 12524, type: "tap", columnIndex: 1 }, { time: 12978, type: "tap", columnIndex: 2 }, { time: 16966, type: "swipe", columnIndex: 0, swipeDir: "right" }, { time: 20420, type: "swipe", columnIndex: 2, swipeDir: "left" }, { time: 24711, type: "tap", columnIndex: 0 }, { time: 25125, type: "tap", columnIndex: 1 }, { time: 25510, type: "tap", columnIndex: 2 }, { time: 25934, type: "tap", columnIndex: 1 }, { time: 39597, type: "tap", columnIndex: 0 }, { time: 40031, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 40484, type: "tap", columnIndex: 1 }, { time: 41747, type: "tap", columnIndex: 0 }, { time: 42204, type: "tap", columnIndex: 1 }, { time: 42626, type: "tap", columnIndex: 0 }, { time: 51606, type: "hold", columnIndex: 1, duration: 2000 }, { time: 66984, type: "tap", columnIndex: 0 }, { time: 67396, type: "tap", columnIndex: 0 }, { time: 67863, type: "tap", columnIndex: 1 }, { time: 68315, type: "swipe", columnIndex: 1, swipeDir: "up" }, { time: 68764, type: "tap", columnIndex: 0 }, { time: 69171, type: "tap", columnIndex: 0 }, { time: 69629, type: "tap", columnIndex: 2 }, { time: 69818, type: "tap", columnIndex: 2 }, { time: 70008, type: "tap", columnIndex: 2 }, { time: 70449, type: "tap", columnIndex: 0 }, { time: 71766, type: "hold", columnIndex: 1, duration: 1094 }, { time: 73943, type: "tap", columnIndex: 0 }, { time: 75129, type: "tap", columnIndex: 0 }, { time: 75572, type: "swipe", columnIndex: 1, swipeDir: "up" }, { time: 76046, type: "tap", columnIndex: 0 }, { time: 76470, type: "tap", columnIndex: 0 }, { time: 76653, type: "tap", columnIndex: 0 }, { time: 76833, type: "tap", columnIndex: 0 }, { time: 76999, type: "tap", columnIndex: 0 }, { time: 77326, type: "swipe", columnIndex: 1, swipeDir: "up" }, { time: 80766, type: "tap", columnIndex: 0 }, { time: 81199, type: "tap", columnIndex: 0 }, { time: 81586, type: "tap", columnIndex: 0 }, { time: 81816, type: "tap", columnIndex: 0 }, { time: 82002, type: "tap", columnIndex: 0 }, { time: 84273, type: "tap", columnIndex: 0 }, { time: 84674, type: "tap", columnIndex: 0 }, { time: 85091, type: "tap", columnIndex: 1 }, { time: 85919, type: "tap", columnIndex: 2 }, { time: 86772, type: "swipe", columnIndex: 1, swipeDir: "up" }, { time: 87770, type: "tap", columnIndex: 0 }], isTutorial: true }; var hasShownInitialMenuAnimation = false; var statsScreenElements = []; var currentBossDisplayElements = []; var currentStatsBossIndex = 0; var miniGameBackgroundInstance = null; var miniGameViewport = { x: 380, y: 1020, width: 1150, height: 780 }; var endlessTimelineOffsetMs = 0; var miniGameScreenElements = []; var miniGamePlayer = null; var miniGameObstacles = []; var currentEyeColor = { r: 255, g: 255, b: 255 }; var isFinalBossActive = false; var nextSpecialEventIdx = 0; var isMidCutsceneActive = false; var miniGameScore = 0; var miniGameScoreText = null; var endlessTimerTxt = null; var endlessStartTime = 0; var endlessMissCount = 0; var isHealOverTimeActive = false; var healOverTimeEndTime = 0; var healAmountPerTick = 2; var healTickInterval = 1000; var lastHealTickTime = 0; var ENDLESS_STATS_KEY = 'walkmanFighters_endlessStats'; var isMiniGameOver = false; var currentMiniGameMusicTrack = null; var ambientParticles = []; var ambientSpawnEnergy = 0; var MAX_AMBIENT_PARTICLES = 80; var AMBIENT_PARTICLE_ASSETS = ['ambient_particle_col0', 'ambient_particle_col1', 'ambient_particle_col2']; var startScreenElements = []; var pressStartBlinkInterval = null; var PLAYER_HP_BAR_X = 1020; var PLAYER_HP_BAR_Y = 2680; var MINI_GAME_LANE_Y_POSITIONS = []; var MINI_GAME_NUMBER_OF_LANES = 3; var MINI_GAME_LANE_HEIGHT = 0; var MINI_GAME_OBJECT_SPEED = 8; var currentMiniGameObjectSpeed = 0; var miniGameTimeActive = 0; var SPATIAL_HITBOX_MULTIPLIER = 1.3; var MINI_GAME_SPEED_INCREASE_INTERVAL = 5000; var MINI_GAME_OBSTACLE_SPAWN_INTERVAL = 2000; var MINI_GAME_SPEED_INCREMENT = 0.5; var MINI_GAME_MOB_SPAWN_INTERVAL = 3500; var lastMiniGameObstacleSpawnTime = 0; var MINI_GAME_OBSTACLE_WIDTH = 100; var MINI_GAME_OBSTACLE_HEIGHT = 100; var mainMenuItemTextObjects = []; var currentMainMenuMusicTrack = null; var mainMenuItems = ["Music Battle", "How To Play", "Endless mode", "Mini game", "Stats", "Credits"]; var selectedMainMenuItemIndex = 0; var gameScreenWidth = 2048; var hitZoneY = 1800; var playerShieldAnimation = null; // === PONIŻSZE DEKLARACJE PRZENOSIMY NA GÓRĘ === var STATIC_HIT_FRAME_WIDTH = 2000; // Dodana nowa stała dla szerokości statycznej ramki var STATIC_HIT_FRAME_HEIGHT = 300; // Dodana nowa stała dla wysokości statycznej ramki var staticHitFrame = null; // Deklaracja statycznej ramki obszaru uderzenia var staticPerfectLine = null; // Deklaracja statycznej linii perfect var PERFECT_LINE_ASSET_KEY = 'perfectLineAsset'; // Nazwa assetu dla cienkiej linii var PERFECT_LINE_HEIGHT = 2; // Wysokość cienkiej linii perfect // === KONIEC PRZENIESIONYCH DEKLARACJI === var gameScreenHeight = Math.round(gameScreenWidth * (2732 / 2048)); var playfieldWidth = 1808; var NUM_COLUMNS = 3; var columnCenterXs = [350, 1024, 1700]; // Podaj swoje wartości! var columnFlashWidths = [620, 400, 620]; var SWIPE_NOTE_WIDTH = 180; // HP System Variables var playerMaxHP = 12; var BOSS_HP_BAR_X = 2030 / 2; var BOSS_HP_BAR_Y = 70; var playerCurrentHP = 10; var bossMaxHP = 30; var bossCurrentHP = 30; var gameOverFlag = false; // HP Bar UI Elements Configuration (actual elements created in setupHpBars) var hpBarWidth = 600; var hpBarHeight = 100; // UI Container var gameUIContainer; // Declare gameUIContainer // HP Bar Containers (will be initialized in setupHpBars) var playerHpBarContainer; var playerHpBarFill; var leftEye = null; var rightEye = null; var eyeFrameAssets = []; var eyesBlinkTimer = null; var currentEndlessDifficulty = 0.5; var ENDLESS_DIFFICULTY_INCREASE_RATE = 0.02; var MAX_ENDLESS_DIFFICULTY = 1.0; var bossHpBarContainer; var bossHpBarFill; var isLockedBossMessageActive = false; var activePowerUpItems = []; var SHIELD_DURATION = 8000; var isShieldActive = false; var shieldEndTime = 0; var POTION_HEAL_AMOUNT = 5; var SWIPE_TO_TAP_BUFF_DURATION = 5000; var isSwipeToTapBuffActive = false; var swipeToTapBuffEndTime = 0; var shieldTimerDisplayContainer; var playerHUD = null; var bossHUD = null; var precisionBuffTimerDisplayContainer; var smallPrecisionIconDisplay; var precisionBuffTimerTextDisplay; var smallShieldIconDisplay; var shieldTimerTextDisplay; var swipeToTapTimerDisplayContainer; var smallSwipeToTapIconDisplay; var swipeToTapTimerTextDisplay; var currentBossSprite; var powerUpDisplayContainer; var hpPotionIcon, shieldIcon, swipeToTapIcon; var hpPotionCountText, shieldCountText, swipeToTapCountText; var currentActiveRhythmMap = null; var ENDLESS_TRAP_CHANCE = 0.08; var noteTravelTime = 3300; var BUFF_CHANCE = 0.04; var ENDLESS_BUFF_CHANCE = 0.12; var gameplayBackground = null; var PRECISION_BUFF_DURATION = 7000; var isPrecisionBuffActive = false; var precisionBuffEndTime = 0; var originalHitWindowPerfect = 0; var precisionBuffHitWindowMultiplier = 1.8; var hitWindowPerfect = 220; var hitWindowGood = 310; var ADDITIONAL_HOLD_MISS_DELAY = 350; var HOLD_NOTE_GOOD_WINDOW_EXTENSION = 120; var MIN_SWIPE_DISTANCE = 60; var notes = []; var nextNoteIdx = 0; var gameStartTime = 0; var score = 0; var bossWasDefeatedThisSong = false; var songSummaryContainer = null; var bossUnlockProgress = {}; var GAME_SCORES_KEY = 'walkmanFighters_scores'; var BOSS_UNLOCK_KEY = 'walkmanFighters_bossUnlock'; var currentFightingBossId = null; var lastPlayedSongKeyForRestart = null; var combo = 0; var maxCombo = 0; var swipeStart = null; var inputLocked = false; var hpBarsInitialized = false; function _typeof5(o) { "@babel/helpers - typeof"; return _typeof5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof5(o); } function _typeof4(o) { "@babel/helpers - typeof"; return _typeof4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof4(o); } function _typeof3(o) { "@babel/helpers - typeof"; return _typeof3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof3(o); } function _typeof2(o) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof2(o); } function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function showTemporaryMessage(message, duration, styleOptions) { var textStyle = { size: 70, fill: 0xFFD700, stroke: 0x000000, strokeThickness: 4, align: 'center', wordWrap: true, wordWrapWidth: gameScreenWidth * 0.8 }; if (styleOptions) { for (var key in styleOptions) { if (styleOptions.hasOwnProperty(key)) { textStyle[key] = styleOptions[key]; } } } var messageText = new Text2(message, textStyle); messageText.anchor.set(0.5, 0.5); messageText.x = gameScreenWidth / 2; messageText.y = gameScreenHeight / 2; messageText.alpha = 0; game.addChild(messageText); tween(messageText, { alpha: 1 }, { duration: 300, easing: tween.easeOut, onFinish: function onFinish() { tween(messageText, { alpha: 0 }, { duration: 300, delay: duration || 2000, easing: tween.easeIn, onFinish: function onFinish() { if (messageText.parent) { messageText.destroy(); } } }); } }); } var activeMusicTrack = null; var activeMusicKey = null; function restartMiniGame() { isMiniGameOver = false; miniGameScore = 0; miniGameTimeActive = 0; currentMiniGameObjectSpeed = MINI_GAME_OBJECT_SPEED; lastMiniGameObstacleSpawnTime = Date.now(); if (miniGamePlayer && miniGamePlayer.asset) { miniGamePlayer.lane = 1; miniGamePlayer.y = MINI_GAME_LANE_Y_POSITIONS[1]; if (miniGamePlayer.asset) { miniGamePlayer.asset.y = miniGamePlayer.y; miniGamePlayer.asset.tint = 0xFFFFFF; } } for (var i = miniGameObstacles.length - 1; i >= 0; i--) { if (miniGameObstacles[i].asset && miniGameObstacles[i].asset.parent) { miniGameObstacles[i].asset.destroy(); } } miniGameObstacles = []; var gameOverText = miniGameScreenElements.find(function (el) { return el.isGameOverText; }); if (gameOverText && gameOverText.parent) { gameOverText.destroy(); var idx = miniGameScreenElements.indexOf(gameOverText); if (idx > -1) { miniGameScreenElements.splice(idx, 1); } } updateMiniGameScoreDisplay(); } function setupGameplayElements() { if (staticPerfectLine && staticPerfectLine.parent) { staticPerfectLine.destroy(); } staticPerfectLine = LK.getAsset(PERFECT_LINE_ASSET_KEY, { anchorX: 0.5, anchorY: 0.5, x: gameScreenWidth / 2, y: hitZoneY, width: playfieldWidth, height: PERFECT_LINE_HEIGHT, alpha: 0.9, visible: false }); game.addChild(staticPerfectLine); if (staticHitFrame && staticHitFrame.parent) { staticHitFrame.destroy(); } staticHitFrame = LK.getAsset('FRAME1', { anchorX: 0.5, anchorY: 0.5, x: gameScreenWidth / 2, y: hitZoneY, width: STATIC_HIT_FRAME_WIDTH, height: STATIC_HIT_FRAME_HEIGHT, alpha: 0.7, visible: false }); game.addChild(staticHitFrame); for (var i = 0; i < NUM_COLUMNS; i++) { if (columnFlashOverlays[i] && columnFlashOverlays[i].parent) { columnFlashOverlays[i].destroy(); } var overlayAssetKey; if (currentScreenState === 'endlessLoopActive') { overlayAssetKey = 'endlessFlash_col' + i; } else { overlayAssetKey = 'flashOverlay_col' + i; } columnFlashOverlays[i] = LK.getAsset(overlayAssetKey, { anchorX: 0.5, anchorY: 0.5, x: columnCenterXs[i], y: gameScreenHeight / 2 }); if (columnFlashOverlays[i]) { game.addChild(columnFlashOverlays[i]); columnFlashOverlays[i].alpha = 0; } } } function fadeInGameplayElements(duration) { var fadeInDuration = duration || 1500; var elementsToFade = [playerHUD, bossHUD, staticHitFrame, staticPerfectLine, scoreTxt, comboTxt]; elementsToFade.forEach(function (el) { if (el) { el.visible = true; el.alpha = 0; var finalAlpha = 1.0; if (el === comboTxt) { finalAlpha = 0.5; } if (el === staticHitFrame) { finalAlpha = 0.7; } if (el === staticPerfectLine) { finalAlpha = 0.9; } tween(el, { alpha: finalAlpha }, { duration: fadeInDuration, easing: tween.easeOutQuad }); } }); } var allParticleAssetKeys = []; for (var i = 1; i <= 12; i++) { allParticleAssetKeys.push('particle' + i); } function createAndAnimateParticle(assetKey, startX, startY, parentContainer) { var comboScaleMultiplier = 1 + Math.floor(combo / 20) * 0.1; // Bazowy mnożnik 1, zwiększa się o 0.1 co 20 combo var particle = LK.getAsset(assetKey, { anchorX: 0.5, anchorY: 0.5, x: startX, y: startY, alpha: 1, scaleX: (3 + Math.random() * 1.2) * comboScaleMultiplier, scaleY: (3 + Math.random() * 1.2) * comboScaleMultiplier, rotation: Math.random() * Math.PI * 2 // Losowa rotacja początkowa }); parentContainer.addChild(particle); var travelAngle = Math.random() * Math.PI * 2; var travelDistance = 50 + Math.random() * 100; // 50 do 150px var targetX = startX + Math.cos(travelAngle) * travelDistance; var targetY = startY + Math.sin(travelAngle) * travelDistance; var duration = 500 + Math.random() * 500; // 500ms do 1000ms tween(particle, { x: targetX, y: targetY, alpha: 0, scaleX: 1 + Math.random() * 2, // Większa skala końcowa X (np. od 0.3 do 0.6) scaleY: 1 + Math.random() * 2, // Większa skala końcowa Y (np. od 0.3 do 0.6) // Skala końcowa Y rotation: particle.rotation + (Math.random() * Math.PI - Math.PI / 2) // Dodatkowa losowa rotacja }, { duration: duration, easing: tween.easeOutQuad, onFinish: function onFinish() { if (particle.parent) { particle.destroy(); } } }); } function spawnParticleEffect(spawnX, spawnY, accuracy, parentContainer) { var numParticlesBase = 0; var numTypesToPick = 0; if (accuracy === 'good') { numParticlesBase = 4; numTypesToPick = 2 + Math.floor(Math.random() * 2); // 2 lub 3 typy } else if (accuracy === 'perfect') { numParticlesBase = 9; numTypesToPick = 3 + Math.floor(Math.random() * 2); // 3 lub 4 typy } else { return; // Nie twórz cząsteczek dla 'miss' lub innych } // Wzmocnienie z combo (prosty przykład, można dostosować) var comboBonusParticles = Math.floor(combo / 3); // 1 dodatkowa cząsteczka co 10 combo var totalParticlesToSpawn = numParticlesBase + comboBonusParticles; if (totalParticlesToSpawn === 0) { return; } // Losowy wybór typów cząsteczek var availableTypes = [].concat(allParticleAssetKeys); // Kopia tablicy var pickedTypes = []; for (var i = 0; i < numTypesToPick; i++) { if (availableTypes.length === 0) { break; } var randomIndex = Math.floor(Math.random() * availableTypes.length); pickedTypes.push(availableTypes.splice(randomIndex, 1)[0]); } if (pickedTypes.length === 0) { // Na wszelki wypadek, jeśli coś pójdzie nie tak pickedTypes.push(allParticleAssetKeys[Math.floor(Math.random() * allParticleAssetKeys.length)]); } for (var i = 0; i < totalParticlesToSpawn; i++) { var particleAssetKey = pickedTypes[i % pickedTypes.length]; // Cyklicznie przez wybrane typy createAndAnimateParticle(particleAssetKey, spawnX, spawnY, parentContainer); } } function flashColumn(columnIndex) { if (isFinalBossActive) { return; } if (columnIndex >= 0 && columnIndex < NUM_COLUMNS && columnFlashOverlays[columnIndex]) { var overlay = columnFlashOverlays[columnIndex]; var flashAlpha; var flashDuration; if (currentScreenState === 'endlessLoopActive') { flashAlpha = 0.8; flashDuration = 1150; } else { flashAlpha = 0.6; flashDuration = 250; } overlay.alpha = flashAlpha; tween(overlay, { alpha: 0 }, { duration: flashDuration, easing: tween.easeOutQuad }); } } function showStartScreen() { if (typeof startScreenElements !== 'undefined' && startScreenElements.forEach) { startScreenElements.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); } startScreenElements = []; if (typeof simpleFlickerTimeout !== 'undefined' && simpleFlickerTimeout) { LK.clearTimeout(simpleFlickerTimeout); simpleFlickerTimeout = null; } if (typeof simpleFlickerPhaseEndTimeout !== 'undefined' && simpleFlickerPhaseEndTimeout) { LK.clearTimeout(simpleFlickerPhaseEndTimeout); simpleFlickerPhaseEndTimeout = null; } if (typeof pressStartBlinkInterval !== 'undefined' && pressStartBlinkInterval) { LK.clearInterval(pressStartBlinkInterval); pressStartBlinkInterval = null; } var pressStartMainGlitchTimer = null; var glowFlickerBurstTimer = null; var subtleJitterTimer = null; currentScreenState = 'startScreenWithGlitch'; if (typeof gameUIContainer !== 'undefined' && gameUIContainer) { gameUIContainer.visible = false; } if (typeof staticHitFrame !== 'undefined' && staticHitFrame) { staticHitFrame.visible = false; } if (typeof staticPerfectLine !== 'undefined' && staticPerfectLine) { staticPerfectLine.visible = false; } var walkmanScreenCenterX = gameScreenWidth / 2 - 300; var walkmanScreenCenterY = gameScreenHeight / 2 + 100; var walkmanScreenWidth = 1200; var walkmanScreenHeight = 1200; var pressStartRotation = Math.PI / 16; var pressStartAssetKey = 'pressStartTextAsset'; var glowAssetKey = 'walkmanScreenGlowAsset'; var backgroundAssetKey = 'walkmanStartScreenBg'; var pressStartVisuals = { main: null, copies: [] }; var pressStartContainer = new Container(); pressStartContainer.x = walkmanScreenCenterX; pressStartContainer.y = walkmanScreenCenterY; startScreenElements.push(pressStartContainer); game.addChild(pressStartContainer); pressStartVisuals.main = LK.getAsset(pressStartAssetKey, { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0, rotation: pressStartRotation, interactive: true, cursor: "pointer" }); pressStartContainer.addChild(pressStartVisuals.main); for (var i = 0; i < 2; i++) { var copy = LK.getAsset(pressStartAssetKey, { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0, rotation: pressStartRotation, alpha: 0 }); pressStartContainer.addChild(copy); pressStartVisuals.copies.push(copy); } var glowingScreen = LK.getAsset(glowAssetKey, { anchorX: 0.5, anchorY: 0.5, x: walkmanScreenCenterX, y: walkmanScreenCenterY, width: walkmanScreenWidth, height: walkmanScreenHeight, alpha: 0.5 }); startScreenElements.push(glowingScreen); game.addChild(glowingScreen); var background = LK.getAsset(backgroundAssetKey, { x: gameScreenWidth / 2, y: gameScreenHeight / 2, anchorX: 0.5, anchorY: 0.5, width: gameScreenWidth, height: gameScreenHeight }); startScreenElements.push(background); game.addChild(background); game.setChildIndex(pressStartContainer, game.children.length - 3); game.setChildIndex(glowingScreen, game.children.length - 2); game.setChildIndex(background, game.children.length - 1); function triggerGlowFlickerBurst() { if (currentScreenState !== 'startScreenWithGlitch' || !glowingScreen || !glowingScreen.parent) { if (glowFlickerBurstTimer) { LK.clearTimeout(glowFlickerBurstTimer); } glowFlickerBurstTimer = null; return; } var burstCount = Math.floor(Math.random() * 3) + 2; var currentBurst = 0; var baseAlpha = 0.5 + Math.random() * 0.2; function singleGlowFlicker() { if (currentBurst >= burstCount || !glowingScreen || !glowingScreen.parent || currentScreenState !== 'startScreenWithGlitch') { if (glowingScreen && glowingScreen.parent) { glowingScreen.alpha = baseAlpha * 0.8; } glowFlickerBurstTimer = LK.setTimeout(triggerGlowFlickerBurst, 2500 + Math.random() * 3000); return; } var flickerToAlpha = Math.random() < 0.5 ? baseAlpha * 0.3 + Math.random() * 0.2 : baseAlpha * 1.2 + Math.random() * 0.3; glowingScreen.alpha = Math.max(0.1, Math.min(0.9, flickerToAlpha)); currentBurst++; glowFlickerBurstTimer = LK.setTimeout(singleGlowFlicker, 50 + Math.random() * 100); } singleGlowFlicker(); } function continuousSubtleJitter() { if (currentScreenState !== 'startScreenWithGlitch' || !pressStartVisuals.main || !pressStartVisuals.main.parent) { if (subtleJitterTimer) { LK.clearTimeout(subtleJitterTimer); } subtleJitterTimer = null; return; } var mainAsset = pressStartVisuals.main; var jitterAmount = 1.5; mainAsset.x = (Math.random() - 0.5) * jitterAmount; mainAsset.y = (Math.random() - 0.5) * jitterAmount; subtleJitterTimer = LK.setTimeout(continuousSubtleJitter, 70 + Math.random() * 60); } function performMainGlitch() { if (currentScreenState !== 'startScreenWithGlitch' || !pressStartVisuals.main || !pressStartVisuals.main.parent) { if (pressStartMainGlitchTimer) { LK.clearTimeout(pressStartMainGlitchTimer); } pressStartMainGlitchTimer = null; return; } var glitchType = Math.random(); var mainAsset = pressStartVisuals.main; var copies = pressStartVisuals.copies; var originalTint = mainAsset.tint || 0xFFFFFF; var originalAlpha = mainAsset.alpha; var textAssetNominalWidth = 280; var textAssetNominalHeight = 70; if (glitchType < 0.08) { var animateDuringSlide = function animateDuringSlide() { if (!mainAsset.parent || !mainAsset.visible || currentScreenState !== 'startScreenWithGlitch') { if (slideEffectInterval) { LK.clearInterval(slideEffectInterval); } if (mainAsset.parent) { mainAsset.tint = originalTint; mainAsset.alpha = originalAlpha; } return; } mainAsset.alpha = 0.15 + Math.random() * 0.5; mainAsset.tint = glitchColors[effectStep % glitchColors.length]; effectStep++; }; var currentJitterX = mainAsset.x; var currentJitterY = mainAsset.y; var slideOutFactorX = 3.0 + Math.random() * 2.0; var slideOutFactorY = Math.random() < 0.3 ? 2.0 + Math.random() * 1.5 : 0; var slideDistanceX = textAssetNominalWidth * slideOutFactorX; var slideDistanceY = textAssetNominalHeight * slideOutFactorY; var targetX = (Math.random() > 0.5 ? 1 : -1) * slideDistanceX; var targetY = (Math.random() > 0.5 ? 1 : -1) * slideDistanceY; var slideDuration = 30 + Math.random() * 20; var slideEffectInterval = null; var effectStep = 0; var glitchColors = [0xff3333, 0x33ff33, 0x3333ff, 0xffff33, 0xcccccc, 0x555555]; if (mainAsset.parent) { slideEffectInterval = LK.setInterval(animateDuringSlide, 20); } tween(mainAsset, { x: targetX, y: targetY }, { duration: slideDuration, easing: tween.easeOutQuad, onFinish: function onFinish() { if (slideEffectInterval) { LK.clearInterval(slideEffectInterval); } if (mainAsset.parent) { mainAsset.tint = originalTint; mainAsset.alpha = 0; } LK.setTimeout(function () { if (mainAsset.parent) { mainAsset.alpha = originalAlpha; tween(mainAsset, { x: currentJitterX, y: currentJitterY }, { duration: 100 + Math.random() * 70, easing: tween.easeInCubic }); } }, 150 + Math.random() * 200); } }); } else if (glitchType < 0.25) { if (!mainAsset.parent) { return; } var prevAlpha = mainAsset.alpha; mainAsset.alpha = 0; LK.setTimeout(function () { if (mainAsset.parent && currentScreenState === 'startScreenWithGlitch') { mainAsset.alpha = prevAlpha; } }, 500); } else if (glitchType < 0.45) { if (!mainAsset.parent) { return; } var glitchColorsSet = [0xff0000, 0x00ff00, 0x0000ff, 0x8A2BE2, 0xFFD700, 0x333333]; var oldTint = mainAsset.tint || 0xFFFFFF; mainAsset.tint = glitchColorsSet[Math.floor(Math.random() * glitchColorsSet.length)]; LK.setTimeout(function () { if (mainAsset.parent && currentScreenState === 'startScreenWithGlitch') { mainAsset.tint = oldTint; } }, 100 + Math.random() * 150); } else if (glitchType < 0.70) { var _doSingleTextFlicker = function doSingleTextFlicker(count) { if (!mainAsset.parent || count <= 0 || currentScreenState !== 'startScreenWithGlitch') { if (mainAsset.parent) { mainAsset.alpha = baseAlpha; } return; } mainAsset.alpha = Math.random() < 0.6 ? 0.1 : Math.random() * 0.4 + 0.5; LK.setTimeout(function () { _doSingleTextFlicker(count - 1); }, flickerInterval); }; var baseAlpha = mainAsset.alpha; if (!mainAsset.parent) { return; } var flickerCount = Math.floor(Math.random() * 4) + 3; var flickerInterval = 25 + Math.random() * 30; _doSingleTextFlicker(flickerCount); } else { if (mainAsset.parent) { mainAsset.alpha = 0; } else { return; } var colors = [0xff0000, 0x00ff00, 0x0000ff]; var offsetAmount = 12 + Math.random() * 6; copies.forEach(function (copy, index) { if (!copy.parent) { return; } copy.tint = colors[index % colors.length]; copy.alpha = 0.55 + Math.random() * 0.25; copy.x = mainAsset.x + (Math.random() - 0.5) * offsetAmount * (index + 1.8); copy.y = mainAsset.y + (Math.random() - 0.5) * offsetAmount * (index + 1.8); }); LK.setTimeout(function () { if (mainAsset.parent && currentScreenState === 'startScreenWithGlitch') { mainAsset.alpha = 1; } copies.forEach(function (copy) { if (copy.parent) { copy.alpha = 0; } }); }, 70 + Math.random() * 80); } pressStartMainGlitchTimer = LK.setTimeout(performMainGlitch, 800 + Math.random() * 1500); } pressStartVisuals.main.down = function () { if (currentScreenState !== 'startScreenWithGlitch') { return; } LK.stopMusic(); LK.playMusic('introMusic'); if (pressStartMainGlitchTimer) { LK.clearTimeout(pressStartMainGlitchTimer); pressStartMainGlitchTimer = null; } if (glowFlickerBurstTimer) { LK.clearTimeout(glowFlickerBurstTimer); glowFlickerBurstTimer = null; } if (subtleJitterTimer) { LK.clearTimeout(subtleJitterTimer); subtleJitterTimer = null; } startScreenElements.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); startScreenElements = []; showIntro(); }; glowFlickerBurstTimer = LK.setTimeout(triggerGlowFlickerBurst, 800 + Math.random() * 700); subtleJitterTimer = LK.setTimeout(continuousSubtleJitter, 100); pressStartMainGlitchTimer = LK.setTimeout(performMainGlitch, 1500 + Math.random() * 1000); } function updateMainMenuHighlight(newIndex) { var defaultTint = 0xFFFFFF; // Biały tint (brak efektu, oryginalny kolor tekstu) var highlightTint = 0xFFD700; // Żółty tint dla podświetlenia var defaultScale = 1.0; var highlightScale = 1.15; // Skala dla podświetlonej opcji // Resetuj styl dla wszystkich opcji for (var i = 0; i < mainMenuItemTextObjects.length; i++) { if (mainMenuItemTextObjects[i] && mainMenuItemTextObjects[i].parent) { // Zakładamy, że bazowy .fill tekstu jest biały (ustawiony przy tworzeniu) mainMenuItemTextObjects[i].tint = defaultTint; mainMenuItemTextObjects[i].scale.set(defaultScale); } } // Ustaw styl dla nowo wybranej opcji if (newIndex >= 0 && newIndex < mainMenuItemTextObjects.length) { if (mainMenuItemTextObjects[newIndex] && mainMenuItemTextObjects[newIndex].parent) { var targetItem = mainMenuItemTextObjects[newIndex]; targetItem.tint = highlightTint; targetItem.scale.set(highlightScale); } } selectedMainMenuItemIndex = newIndex; // Aktualizuj globalny indeks } function showMainMenu(fadeInDuration) { while (mainMenuScreenElements.length > 0) { var el = mainMenuScreenElements.pop(); if (el && el.parent) { el.destroy(); } } if (gameplayBackground && gameplayBackground.parent) { gameplayBackground.destroy(); gameplayBackground = null; } mainMenuScreenElements = []; mainMenuItemTextObjects = []; var mainMenuContainer = new Container(); game.addChild(mainMenuContainer); mainMenuScreenElements.push(mainMenuContainer); currentScreenState = 'mainmenu_walkman'; initializeBossData(); if (gameUIContainer) { gameUIContainer.visible = false; } if (staticHitFrame) { staticHitFrame.visible = false; } if (staticPerfectLine) { staticPerfectLine.visible = false; } if (shieldTimerDisplayContainer) { shieldTimerDisplayContainer.visible = false; } if (swipeToTapTimerDisplayContainer) { swipeToTapTimerDisplayContainer.visible = false; } if (songSummaryContainer && songSummaryContainer.parent) { songSummaryContainer.destroy(); songSummaryContainer = null; } var glassX = 380; var glassY = 1020; var glassWidth = 1150; var glassHeight = 820; var glassInitialAlpha = 0.3; var glassFinalAlpha = 0.7; var menuItemFontSize = 120; var menuItemSpacing = 225; var TARGET_CENTER_X_FOR_MENU_ITEMS = glassX + glassWidth / 2; var TARGET_CENTER_Y_FOR_SELECTED_ITEM = glassY + glassHeight / 2; var menuTextContainer = new Container(); mainMenuContainer.addChild(menuTextContainer); var creditsGraphic = LK.getAsset('creditsTextAsset', { x: TARGET_CENTER_X_FOR_MENU_ITEMS, y: TARGET_CENTER_Y_FOR_SELECTED_ITEM, anchorX: 0.5, anchorY: 0.5, visible: false }); mainMenuContainer.addChild(creditsGraphic); selectedMainMenuItemIndex = 0; for (var i_menu = 0; i_menu < mainMenuItems.length; i_menu++) { var itemText_menu = new Text2(mainMenuItems[i_menu], { size: menuItemFontSize, fill: 0xFFFFFF, align: 'center', wordWrap: false }); itemText_menu.anchor.set(0.5, 0.5); itemText_menu.interactive = false; menuTextContainer.addChild(itemText_menu); mainMenuItemTextObjects.push(itemText_menu); } var layoutAndHighlightFunctionRef = function layoutAndHighlightFunctionRef() { var defaultTint = 0xFFFFFF; var highlightTint = 0xFFD700; var defaultScale = 1.0; var highlightScale = 1.15; for (var idx = 0; idx < mainMenuItemTextObjects.length; idx++) { var item_layout = mainMenuItemTextObjects[idx]; if (item_layout && item_layout.parent) { item_layout.x = TARGET_CENTER_X_FOR_MENU_ITEMS; item_layout.y = TARGET_CENTER_Y_FOR_SELECTED_ITEM + (idx - selectedMainMenuItemIndex) * menuItemSpacing; if (idx === selectedMainMenuItemIndex) { item_layout.tint = highlightTint; item_layout.scale.set(highlightScale); } else { item_layout.tint = defaultTint; item_layout.scale.set(defaultScale); } } } }; var glass = LK.getAsset('glass', { x: glassX, y: glassY, width: glassWidth, height: glassHeight, alpha: 0, interactive: false }); mainMenuContainer.addChild(glass); var glass2 = LK.getAsset('glass2', { x: glassX, y: glassY, width: glassWidth, height: glassHeight, alpha: 0, interactive: false }); mainMenuContainer.addChild(glass2); var walkmanFrame = LK.getAsset('mainmenu', { x: 0, y: 0, width: gameScreenWidth, height: gameScreenHeight }); mainMenuContainer.addChild(walkmanFrame); var upButton = LK.getAsset('upbutton', {}); upButton.x = 210; upButton.y = gameScreenHeight / 2 - 180; upButton.anchor.set(0.5, 0.5); upButton.interactive = true; upButton.cursor = "pointer"; upButton.down = function () { if (isConfirmationDialogActive) { selectedConfirmationOptionIndex = 0; updateConfirmationHighlight(); } else if (currentScreenState === 'mainmenu_walkman') { if (selectedMainMenuItemIndex > 0) { selectedMainMenuItemIndex--; } else { selectedMainMenuItemIndex = mainMenuItems.length - 1; } layoutAndHighlightFunctionRef(); } else if (currentScreenState === 'miniGameActive' && !isMiniGameOver) { if (miniGamePlayer && miniGamePlayer.lane > 0) { miniGamePlayer.lane--; miniGamePlayer.y = MINI_GAME_LANE_Y_POSITIONS[miniGamePlayer.lane]; if (miniGamePlayer.asset) { miniGamePlayer.asset.y = miniGamePlayer.y; } } } }; mainMenuContainer.addChild(upButton); var downButton = LK.getAsset('downbutton', {}); downButton.x = 210; downButton.y = gameScreenHeight / 2 + 220; downButton.anchor.set(0.5, 0.5); downButton.interactive = true; downButton.cursor = "pointer"; downButton.down = function () { if (isConfirmationDialogActive) { selectedConfirmationOptionIndex = 1; updateConfirmationHighlight(); } else if (currentScreenState === 'mainmenu_walkman') { if (selectedMainMenuItemIndex < mainMenuItems.length - 1) { selectedMainMenuItemIndex++; } else { selectedMainMenuItemIndex = 0; } layoutAndHighlightFunctionRef(); } else if (currentScreenState === 'miniGameActive' && !isMiniGameOver) { if (miniGamePlayer && miniGamePlayer.lane < MINI_GAME_NUMBER_OF_LANES - 1) { miniGamePlayer.lane++; miniGamePlayer.y = MINI_GAME_LANE_Y_POSITIONS[miniGamePlayer.lane]; if (miniGamePlayer.asset) { miniGamePlayer.asset.y = miniGamePlayer.y; } } } }; mainMenuContainer.addChild(downButton); var playButton = LK.getAsset('play', {}); playButton.x = gameScreenWidth - 350; playButton.y = gameScreenHeight / 2 - 240; playButton.anchor.set(0.5, 0.5); playButton.interactive = true; playButton.cursor = "pointer"; playButton.down = function () { if (currentScreenState === 'mainmenu_walkman') { LK.stopMusic(); LK.playMusic('introMusic'); } }; mainMenuContainer.addChild(playButton); var stopButton = LK.getAsset('stop', {}); stopButton.x = gameScreenWidth - 350; stopButton.y = gameScreenHeight / 2; stopButton.anchor.set(0.5, 0.5); stopButton.interactive = true; stopButton.cursor = "pointer"; stopButton.down = function () { LK.stopMusic(); }; mainMenuContainer.addChild(stopButton); var fightButton = LK.getAsset('fight', {}); fightButton.x = gameScreenWidth - 350; fightButton.y = gameScreenHeight / 2 + 240; fightButton.anchor.set(0.5, 0.5); fightButton.interactive = true; fightButton.cursor = "pointer"; fightButton.down = function () { if (isConfirmationDialogActive) { if (selectedConfirmationOptionIndex === 0) { if (onConfirmYes) { onConfirmYes(); } } else { if (onConfirmNo) { onConfirmNo(); } } return; } if (currentScreenState !== 'mainmenu_walkman') { if (currentScreenState === 'miniGameActive' && isMiniGameOver) { restartMiniGame(); } return; } var selectedAction = mainMenuItems[selectedMainMenuItemIndex]; switch (selectedAction) { case "Music Battle": case "Endless mode": case "How To Play": mainMenuScreenElements.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); mainMenuScreenElements = []; mainMenuItemTextObjects = []; if (menuTextContainer && menuTextContainer.parent) { menuTextContainer.destroy(); } menuTextContainer = null; if (selectedAction === "Music Battle") { showBossSelectionScreen(); } else if (selectedAction === "Endless mode") { startEndlessMode(); } else if (selectedAction === "How To Play") { LK.stopMusic(); runTutorialGameplay(); } break; case "Stats": case "Mini game": if (menuTextContainer) { menuTextContainer.visible = false; } if (selectedAction === "Stats") { showStatsScreen(); } else if (selectedAction === "Mini game") { LK.stopMusic(); showMiniGameScreen(); } break; case "Credits": if (menuTextContainer) { menuTextContainer.visible = false; } if (creditsGraphic) { creditsGraphic.visible = true; } currentScreenState = 'mainmenu_credits'; break; } }; mainMenuContainer.addChild(fightButton); var rewindButtonMainMenu = LK.getAsset('rewindbutton', {}); rewindButtonMainMenu.x = 350; rewindButtonMainMenu.y = gameScreenHeight / 2 + 650; rewindButtonMainMenu.anchor.set(0.5, 0.5); rewindButtonMainMenu.interactive = true; rewindButtonMainMenu.cursor = "pointer"; rewindButtonMainMenu.down = function () { if (currentScreenState === 'mainmenu_credits') { currentScreenState = 'mainmenu_walkman'; menuTextContainer.visible = true; creditsGraphic.visible = false; } }; mainMenuContainer.addChild(rewindButtonMainMenu); var allStandardBossesDefeated = true; var specialBossButtonAssetKey = allStandardBossesDefeated ? 'specialboss_unlocked' : 'specialboss_locked'; var specialBossButtonMainMenu = LK.getAsset(specialBossButtonAssetKey, {}); specialBossButtonMainMenu.width = 250; var originalAssetWidthForRatioSB = 300; var originalAssetHeightUnlockedSB = 250; var originalAssetHeightLockedSB = 250; specialBossButtonMainMenu.height = (specialBossButtonAssetKey === 'specialboss_unlocked' ? originalAssetHeightUnlockedSB : originalAssetHeightLockedSB) * (specialBossButtonMainMenu.width / originalAssetWidthForRatioSB); specialBossButtonMainMenu.x = 950; specialBossButtonMainMenu.y = 2030; specialBossButtonMainMenu.anchor.set(0.5, 0.5); specialBossButtonMainMenu.interactive = true; if (allStandardBossesDefeated) { specialBossButtonMainMenu.cursor = "pointer"; specialBossButtonMainMenu.down = function () { if (isConfirmationDialogActive) { return; } showConfirmationDialog(mainMenuContainer, glass2, menuTextContainer, function () { hideConfirmationDialog(menuTextContainer, glass2); mainMenuScreenElements.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); mainMenuScreenElements = []; showFinalBossIntro(function () { loadFinalBossEncounter(); }); }, function () { hideConfirmationDialog(menuTextContainer, glass2); }); }; } else { specialBossButtonMainMenu.cursor = "default"; specialBossButtonMainMenu.down = function () { if (currentScreenState !== 'mainmenu_walkman' && currentScreenState !== 'bossGallery_paged') { return; } var containerToFade = null; if (currentScreenState === 'mainmenu_walkman') { containerToFade = menuTextContainer; } else if (currentScreenState === 'bossGallery_paged') { containerToFade = cardsContainer; } displayLockedMessage(containerToFade, mainMenuContainer, glass2); }; } mainMenuContainer.addChild(specialBossButtonMainMenu); layoutAndHighlightFunctionRef(); if (!hasShownInitialMenuAnimation) { hasShownInitialMenuAnimation = true; mainMenuContainer.alpha = 0; menuTextContainer.alpha = 0; glass.alpha = glassInitialAlpha; glass2.alpha = 0; tween(mainMenuContainer, { alpha: 1 }, { duration: 1000, easing: tween.easeLinear }); tween(glass, { alpha: 0 }, { duration: 2000, delay: 500, easing: tween.easeLinear }); tween(glass2, { alpha: glassFinalAlpha }, { duration: 2000, delay: 500, easing: tween.easeLinear }); LK.setTimeout(function () { if (menuTextContainer && menuTextContainer.parent) { tween(menuTextContainer, { alpha: 1 }, { duration: 800, easing: tween.easeLinear }); } }, 2000); } else { mainMenuContainer.alpha = 1; menuTextContainer.alpha = 1; glass.alpha = 0; glass2.alpha = glassFinalAlpha; } } function exitMiniGameAndReturnToMainMenu() { LK.stopMusic(); LK.playMusic('introMusic'); if (miniGamePlayer && miniGamePlayer.asset && miniGamePlayer.asset.hasOwnProperty('tint')) { miniGamePlayer.asset.tint = 0xFFFFFF; } isMiniGameOver = true; if (miniGameBackgroundInstance && miniGameBackgroundInstance.parent) { miniGameBackgroundInstance.visible = false; } while (miniGameScreenElements.length > 0) { var el_exit_mg = miniGameScreenElements.pop(); if (el_exit_mg && el_exit_mg.parent) { if (el_exit_mg === miniGameBackgroundInstance && miniGameBackgroundInstance && miniGameBackgroundInstance.visible === false) {} else { el_exit_mg.destroy(); } } } if (miniGameBackgroundInstance && miniGameBackgroundInstance.parent && miniGameBackgroundInstance.visible === false) {} else if (miniGameBackgroundInstance && !miniGameBackgroundInstance.parent) { miniGameBackgroundInstance = null; } miniGamePlayer = null; miniGameObstacles = []; if (miniGameScoreText && miniGameScoreText.parent) { miniGameScoreText.destroy(); } miniGameScoreText = null; currentScreenState = 'mainmenu_walkman'; showMainMenu(); } function startEyeColorCycling() { var colors = [0x66FF66, 0x6666FF, 0xFFFF66, 0xFF66FF, 0x66FFFF, 0xFFFFFF, 0xFF6666]; var colorIndex = 0; var colorTweenInterval = null; if (eyeColorInterval) { LK.clearInterval(eyeColorInterval); } var changeColor = function changeColor() { if (!leftEye || !rightEye || !leftEye.parent || !rightEye.parent) { if (eyeColorInterval) { LK.clearInterval(eyeColorInterval); } if (colorTweenInterval) { LK.clearInterval(colorTweenInterval); } eyeColorInterval = null; colorTweenInterval = null; return; } if (colorTweenInterval) { LK.clearInterval(colorTweenInterval); } var startColor = { r: currentEyeColor.r, g: currentEyeColor.g, b: currentEyeColor.b }; var targetHex = colors[colorIndex % colors.length]; colorIndex++; var targetColor = { r: targetHex >> 16 & 255, g: targetHex >> 8 & 255, b: targetHex & 255 }; var duration = 2000; var startTime = Date.now(); colorTweenInterval = LK.setInterval(function () { var now = Date.now(); var progress = (now - startTime) / duration; if (progress >= 1) { progress = 1; if (colorTweenInterval) { LK.clearInterval(colorTweenInterval); colorTweenInterval = null; } } var easedProgress = progress < 0.5 ? 2 * progress * progress : 1 - Math.pow(-2 * progress + 2, 2) / 2; currentEyeColor.r = startColor.r + (targetColor.r - startColor.r) * easedProgress; currentEyeColor.g = startColor.g + (targetColor.g - startColor.g) * easedProgress; currentEyeColor.b = startColor.b + (targetColor.b - startColor.b) * easedProgress; }, 30); }; eyeColorInterval = LK.setInterval(changeColor, 10000); changeColor(); } function spawnMiniGameObstacle() { // Zmieniona nazwa i usunięte mobki var now = Date.now(); if (now > lastMiniGameObstacleSpawnTime + MINI_GAME_OBSTACLE_SPAWN_INTERVAL * (0.5 + Math.random())) { var randomLane = Math.floor(Math.random() * MINI_GAME_NUMBER_OF_LANES); var obstacleFrames = [LK.getAsset('obstacle_anim_1', {}), LK.getAsset('obstacle_anim_2', {}), LK.getAsset('obstacle_anim_3', {}), LK.getAsset('obstacle_anim_4', {}), LK.getAsset('obstacle_anim_5', {})]; var obstacleAnimation = new SpriteAnimation({ frames: obstacleFrames, frameDuration: 350, loop: true, anchorX: 0.5, anchorY: 0.5, x: miniGameViewport.x + miniGameViewport.width + MINI_GAME_OBSTACLE_WIDTH / 2 - 50, y: MINI_GAME_LANE_Y_POSITIONS[randomLane] }); var newObstacle = { x: obstacleAnimation.x, y: obstacleAnimation.y, width: MINI_GAME_OBSTACLE_WIDTH, height: MINI_GAME_OBSTACLE_HEIGHT, type: 'obstacle', asset: obstacleAnimation, scored: false }; game.addChild(obstacleAnimation); miniGameScreenElements.push(obstacleAnimation); miniGameObstacles.push(newObstacle); lastMiniGameObstacleSpawnTime = now; // console.log("Spawned obstacle in lane " + randomLane); } } function moveMiniGameObstacles() { if (!miniGamePlayer || isMiniGameOver) { return; } for (var i = miniGameObstacles.length - 1; i >= 0; i--) { var obs = miniGameObstacles[i]; obs.x -= currentMiniGameObjectSpeed; if (obs.asset) { obs.asset.x = obs.x; } if (!obs.scored && obs.x < miniGamePlayer.x - miniGamePlayer.width / 2) { miniGameScore += 5; obs.scored = true; updateMiniGameScoreDisplay(); } if (obs.x < miniGameViewport.x - obs.width / 2 + 50) { if (obs.asset && obs.asset.parent) { obs.asset.destroy(); } var obsAssetIndex = miniGameScreenElements.indexOf(obs.asset); if (obsAssetIndex > -1) { miniGameScreenElements.splice(obsAssetIndex, 1); } miniGameObstacles.splice(i, 1); } } } function updateMiniGameScoreDisplay() { if (miniGameScoreText) { miniGameScoreText.setText("Score: " + miniGameScore); } } var allBossData = []; var activeHelperBosses = []; var autoplayColumns = [false, false, false]; var confirmationContentContainer = null; var confirmationOptions = []; var selectedConfirmationOptionIndex = 0; var isConfirmationDialogActive = false; var onConfirmYes = null; var onConfirmNo = null; var currentBossViewStartIndex = 0; var cardsContainer = null; var visibleBossCards = [null, null, null, null]; var selectedCardSlotIndex = 0; var peekingBossCards = [null, null]; var placeholderMusicKey = 'test1'; var placeholderSongMapKey = 'defaultTestTrack'; var visibleBossCards = [null, null]; var helperBossContainer = null; var finalBossEventList = [{ time: 73000, type: 'helper_appear', buffType: 'shield', duration: 7000, bossId: 'boss1', text: "I'll protect you!" }, { time: 76000, type: 'helper_appear', buffType: 'autoplay', duration: 30000, bossId: 'boss8', targetColumn: 1, text: "I'll handle this!" }, { time: 76000, type: 'helper_appear', buffType: 'autoplay', duration: 30000, bossId: 'boss6', targetColumn: 2, text: "Let me help!" }, { time: 116000, type: 'helper_appear', buffType: 'heal_over_time', duration: 15000, bossId: 'boss2', text: "You can do it!" }, { time: 126000, type: 'helper_appear', buffType: 'autoplay', duration: 30000, bossId: 'boss7', targetColumn: 0, text: "My turn!" }, { time: 126000, type: 'helper_appear', buffType: 'autoplay', duration: 30000, bossId: 'boss5', targetColumn: 2, text: "Leave it to me!" }, { time: 149256, type: 'start_mid_cutscene' }]; function initializeBossData() { allBossData = [{ id: 'boss1', displayName: 'Boss 1', cardAssetKey: 'boss1', musicAssetKey: 'Orctave', songMapKey: 'OrctaveBossTrack', defeatsRequired: 0 }, { id: 'boss2', displayName: 'Boss 2', cardAssetKey: 'boss2', musicAssetKey: 'Goblop', songMapKey: 'GoblopBossTrack', defeatsRequired: 0 }, { id: 'boss3', displayName: 'Boss 3', cardAssetKey: 'boss3', musicAssetKey: 'Noizboy', songMapKey: 'NoizboyTrack', defeatsRequired: 0 }, { id: 'boss4', displayName: 'Boss 4', cardAssetKey: 'boss4', musicAssetKey: 'Octobeat', songMapKey: 'OctobeatBossTrack', defeatsRequired: 1 }, { id: 'boss5', displayName: 'Bitbot', cardAssetKey: 'boss5', musicAssetKey: 'Bitbot', songMapKey: 'BitbotBossTrack', defeatsRequired: 2 }, { id: 'boss6', displayName: 'Salabass', cardAssetKey: 'boss6', musicAssetKey: 'Salabass', songMapKey: 'SalabassTrack', defeatsRequired: 3 }, { id: 'boss7', displayName: 'Funkilla', cardAssetKey: 'boss7', musicAssetKey: 'Funkilla', songMapKey: 'Funkilla_Track', defeatsRequired: 4 }, { id: 'boss8', displayName: 'DJ Pepe', cardAssetKey: 'boss8', musicAssetKey: 'djpepe', songMapKey: 'DJPepe_Track', defeatsRequired: 5 }]; var loadedUnlockProgress = storage[BOSS_UNLOCK_KEY]; if (loadedUnlockProgress) { bossUnlockProgress = loadedUnlockProgress; for (var i = 0; i < allBossData.length; i++) { var bossId = allBossData[i].id; if (!bossUnlockProgress.hasOwnProperty(bossId)) { bossUnlockProgress[bossId] = false; } } } else { bossUnlockProgress = {}; for (var j = 0; j < allBossData.length; j++) { bossUnlockProgress[allBossData[j].id] = false; } } } function updateSelectedCardVisual() { for (var i = 0; i < visibleBossCards.length; i++) { var cardContainer = visibleBossCards[i]; if (cardContainer && cardContainer.visualAsset) { if (i === selectedCardSlotIndex) { cardContainer.visualAsset.tint = 0xFFFF00; cardContainer.scale.set(1.05); } else { cardContainer.visualAsset.tint = 0xFFFFFF; cardContainer.scale.set(1.0); } } } } function displayBossCards(newStartIndex, isInitialDisplay, numberOfDefeated) { currentBossViewStartIndex = newStartIndex; var singleCardDisplayWidth = 400; var singleCardDisplayHeight = 380; var spacingBetweenCardsX = 80; var cardSlotX_0 = singleCardDisplayWidth / 2; var cardSlotX_1 = singleCardDisplayWidth * 1.5 + spacingBetweenCardsX; var mainCardsCenterY_relative = singleCardDisplayHeight / 2; var peekingCardVisibleSliceHeight = 80; var verticalOffsetMainToPeeking = 140; var mainCardSlotsPositions = [{ x: cardSlotX_0, y: mainCardsCenterY_relative }, { x: cardSlotX_1, y: mainCardsCenterY_relative }]; var peekingCardsTopY_relative = mainCardsCenterY_relative + singleCardDisplayHeight / 2 + verticalOffsetMainToPeeking; var peekingCardSlotsPositions = [{ x: cardSlotX_0, y: peekingCardsTopY_relative }, { x: cardSlotX_1, y: peekingCardsTopY_relative }]; if (!cardsContainer) { return; } while (cardsContainer.children[0]) { cardsContainer.removeChild(cardsContainer.children[0]).destroy(); } visibleBossCards = [null, null]; peekingBossCards = [null, null]; for (var i = 0; i < 2; i++) { var dataIndex = currentBossViewStartIndex + i; if (dataIndex < allBossData.length) { var bossData = allBossData[dataIndex]; var cardContainer = new Container(); cardContainer.x = mainCardSlotsPositions[i].x; cardContainer.y = mainCardSlotsPositions[i].y; cardContainer.bossData = bossData; cardContainer.slotIndex = i; var cardAsset = LK.getAsset(bossData.cardAssetKey, {}); cardAsset.anchor.set(0.5, 0.5); cardAsset.width = singleCardDisplayWidth; cardAsset.height = singleCardDisplayHeight; cardContainer.visualAsset = cardAsset; cardContainer.addChild(cardAsset); var isUnlocked = bossData.defeatsRequired === 0 || numberOfDefeated >= bossData.defeatsRequired; bossData.isUnlocked = isUnlocked; cardContainer.interactive = true; cardContainer.cursor = "pointer"; cardContainer.down = function () { selectedCardSlotIndex = this.slotIndex; updateSelectedCardVisual(); }; cardsContainer.addChild(cardContainer); visibleBossCards[i] = cardContainer; } } for (var j = 0; j < 2; j++) { var peekingDataIndex = currentBossViewStartIndex + 2 + j; if (peekingDataIndex < allBossData.length) { var peekingBossData = allBossData[peekingDataIndex]; var peekingCardContainer = new Container(); peekingCardContainer.x = peekingCardSlotsPositions[j].x; peekingCardContainer.y = peekingCardSlotsPositions[j].y; var peekingCardAsset = LK.getAsset(peekingBossData.cardAssetKey, {}); peekingCardAsset.anchor.set(0.5, 0); peekingCardAsset.width = singleCardDisplayWidth; peekingCardAsset.height = singleCardDisplayHeight; peekingCardContainer.addChild(peekingCardAsset); peekingCardContainer.interactive = false; cardsContainer.addChild(peekingCardContainer); peekingBossCards[j] = peekingCardContainer; } } if (isInitialDisplay) { selectedCardSlotIndex = 0; } else { var maxSlotOnNewPage = Math.min(1, allBossData.length - 1 - currentBossViewStartIndex); if (selectedCardSlotIndex > maxSlotOnNewPage) { selectedCardSlotIndex = maxSlotOnNewPage; } } updateSelectedCardVisual(); } function getNumberOfDefeatedBosses() { var count = 0; for (var i = 0; i < allBossData.length; i++) { // Zakładamy, że allBossData zawiera tylko standardowych bossów (1-8) var bossId = allBossData[i].id; if (bossUnlockProgress.hasOwnProperty(bossId) && bossUnlockProgress[bossId] === true) { count++; } } return count; } function showBossSelectionScreen() { if (songSummaryContainer && songSummaryContainer.parent) { songSummaryContainer.destroy(); songSummaryContainer = null; } currentScreenState = 'bossGallery_paged'; if (gameUIContainer) { gameUIContainer.visible = false; } if (staticHitFrame) { staticHitFrame.visible = false; } if (staticPerfectLine) { staticPerfectLine.visible = false; } if (shieldTimerDisplayContainer) { shieldTimerDisplayContainer.visible = false; } if (swipeToTapTimerDisplayContainer) { swipeToTapTimerDisplayContainer.visible = false; } initializeBossData(); var numberOfDefeated = getNumberOfDefeatedBosses(); var screenElements = []; var tempSingleCardDisplayWidth = 400; var tempSingleCardDisplayHeight = 380; var tempSpacingBetweenCardsX = 80; var tempGroupHorizontalOffset = -60; var tempGroupVerticalOffset = -90; var screenAreaContentWidth = tempSingleCardDisplayWidth * 2 + tempSpacingBetweenCardsX; var screenAreaX = (gameScreenWidth - screenAreaContentWidth) / 2 + tempGroupHorizontalOffset; var screenAreaY = gameScreenHeight / 2 + tempGroupVerticalOffset - tempSingleCardDisplayHeight / 2; if (cardsContainer && cardsContainer.parent) { cardsContainer.destroy(); } cardsContainer = new Container(); cardsContainer.x = screenAreaX; cardsContainer.y = screenAreaY; game.addChild(cardsContainer); screenElements.push(cardsContainer); displayBossCards(0, true, numberOfDefeated); var glassAsset = LK.getAsset('glass2', { x: 324, y: 886, width: 1180, height: 1300, alpha: 0.4, interactive: false }); game.addChild(glassAsset); screenElements.push(glassAsset); var galleryBg = LK.getAsset('galleryBackground', { width: gameScreenWidth, height: gameScreenHeight, x: 0, y: 0 }); game.addChild(galleryBg); screenElements.push(galleryBg); var upButton = LK.getAsset('upbutton', {}); upButton.x = 210; upButton.y = gameScreenHeight / 2 - 180; upButton.anchor.set(0.5, 0.5); upButton.interactive = true; upButton.cursor = "pointer"; upButton.down = function () { if (isConfirmationDialogActive) { selectedConfirmationOptionIndex = 0; updateConfirmationHighlight(); } else { var newStartIndex = currentBossViewStartIndex - 2; if (newStartIndex < 0) { newStartIndex = 0; } if (newStartIndex !== currentBossViewStartIndex) { displayBossCards(newStartIndex, false, numberOfDefeated); } } }; game.addChild(upButton); screenElements.push(upButton); var downButton = LK.getAsset('downbutton', {}); downButton.x = 210; downButton.y = gameScreenHeight / 2 + 220; downButton.anchor.set(0.5, 0.5); downButton.interactive = true; downButton.cursor = "pointer"; downButton.down = function () { if (isConfirmationDialogActive) { selectedConfirmationOptionIndex = 1; updateConfirmationHighlight(); } else { var newStartIndex = currentBossViewStartIndex + 2; if (newStartIndex < allBossData.length) { displayBossCards(newStartIndex, false, numberOfDefeated); } } }; game.addChild(downButton); screenElements.push(downButton); var playButton = LK.getAsset('play', {}); playButton.x = gameScreenWidth - 350; playButton.y = gameScreenHeight / 2 - 240; playButton.anchor.set(0.5, 0.5); playButton.interactive = true; playButton.cursor = "pointer"; playButton.down = function () { if (isConfirmationDialogActive) { return; } var selectedBossDataIndex = currentBossViewStartIndex + selectedCardSlotIndex; if (selectedBossDataIndex < allBossData.length) { var bossData = allBossData[selectedBossDataIndex]; if (bossData.musicAssetKey) { LK.stopMusic(); LK.playMusic(bossData.musicAssetKey); } } }; game.addChild(playButton); screenElements.push(playButton); var stopButton = LK.getAsset('stop', {}); stopButton.x = gameScreenWidth - 350; stopButton.y = gameScreenHeight / 2; stopButton.anchor.set(0.5, 0.5); stopButton.interactive = true; stopButton.cursor = "pointer"; stopButton.down = function () { if (isConfirmationDialogActive) { return; } LK.stopMusic(); }; game.addChild(stopButton); screenElements.push(stopButton); var fightButton = LK.getAsset('fight', {}); fightButton.x = gameScreenWidth - 350; fightButton.y = gameScreenHeight / 2 + 240; fightButton.anchor.set(0.5, 0.5); fightButton.interactive = true; fightButton.cursor = "pointer"; fightButton.down = function () { if (isConfirmationDialogActive) { if (selectedConfirmationOptionIndex === 0) { if (onConfirmYes) { onConfirmYes(); } } else { if (onConfirmNo) { onConfirmNo(); } } return; } LK.stopMusic(); var selectedDataIndex = currentBossViewStartIndex + selectedCardSlotIndex; if (selectedDataIndex < allBossData.length) { var selectedBoss = allBossData[selectedDataIndex]; if (selectedBoss && selectedBoss.isUnlocked) { var bossIdNumber = parseInt(selectedBoss.id.replace('boss', ''), 10); screenElements.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); screenElements = []; if (cardsContainer && cardsContainer.parent) { cardsContainer.destroy(); cardsContainer = null; } loadSong(selectedBoss.songMapKey); } } }; game.addChild(fightButton); screenElements.push(fightButton); var rewindButton = LK.getAsset('rewindbutton', {}); rewindButton.x = 350; rewindButton.y = gameScreenHeight / 2 + 650; rewindButton.anchorX = 0.5; rewindButton.anchorY = 0.5; rewindButton.interactive = true; rewindButton.cursor = "pointer"; rewindButton.down = function () { if (isConfirmationDialogActive) { if (onConfirmNo) { onConfirmNo(); } return; } LK.stopMusic(); LK.playMusic('introMusic'); screenElements.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); screenElements = []; if (cardsContainer && cardsContainer.parent) { cardsContainer.destroy(); cardsContainer = null; } currentBossViewStartIndex = 0; selectedCardSlotIndex = 0; showMainMenu(); }; game.addChild(rewindButton); screenElements.push(rewindButton); var allStandardBossesDefeated = true; var specialBossButtonAssetKey = allStandardBossesDefeated ? 'specialboss_unlocked' : 'specialboss_locked'; var specialBossButton = LK.getAsset(specialBossButtonAssetKey, {}); specialBossButton.width = 250; var originalAssetWidthForRatioSB = 300; var originalAssetHeightUnlockedSB = 250; var originalAssetHeightLockedSB = 250; specialBossButton.height = (specialBossButtonAssetKey === 'specialboss_unlocked' ? originalAssetHeightUnlockedSB : originalAssetHeightLockedSB) * (specialBossButton.width / originalAssetWidthForRatioSB); specialBossButton.x = 950; specialBossButton.y = 2030; specialBossButton.anchor.set(0.5, 0.5); specialBossButton.interactive = true; if (allStandardBossesDefeated) { specialBossButton.cursor = "pointer"; specialBossButton.down = function () { if (isConfirmationDialogActive) { return; } showConfirmationDialog(game, glassAsset, cardsContainer, function () { hideConfirmationDialog(cardsContainer, glassAsset); screenElements.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); screenElements = []; showFinalBossIntro(function () { loadFinalBossEncounter(); }); }, function () { hideConfirmationDialog(cardsContainer, glassAsset); }); }; } else { specialBossButton.cursor = "default"; specialBossButton.down = function () { if (isConfirmationDialogActive) { return; } displayLockedMessage(cardsContainer, game, glassAsset); }; } game.addChild(specialBossButton); screenElements.push(specialBossButton); } function updateConfirmationHighlight() { var defaultTint = 0xFFFFFF; var highlightTint = 0xFFD700; var defaultScale = 1.0; var highlightScale = 1.15; for (var i = 0; i < confirmationOptions.length; i++) { var option = confirmationOptions[i]; if (option && option.parent) { if (i === selectedConfirmationOptionIndex) { option.tint = highlightTint; option.scale.set(highlightScale); } else { option.tint = defaultTint; option.scale.set(defaultScale); } } } } function hideConfirmationDialog(containerToFadeIn, glassToRestore) { if (confirmationContentContainer && confirmationContentContainer.parent) { confirmationContentContainer.destroy(); } if (containerToFadeIn) { containerToFadeIn.visible = true; tween(containerToFadeIn, { alpha: 1 }, { duration: 400 }); } if (glassToRestore) { tween(glassToRestore, { alpha: 0.4 }, { duration: 400 }); } confirmationContentContainer = null; confirmationOptions = []; isConfirmationDialogActive = false; onConfirmYes = null; onConfirmNo = null; } function showConfirmationDialog(parentContainer, referenceObject, containerToFade, yesCallback, noCallback) { if (isConfirmationDialogActive) { return; } if (referenceObject) { tween(referenceObject, { alpha: 0.1 }, { duration: 400 }); } if (containerToFade) { tween(containerToFade, { alpha: 0 }, { duration: 400, onFinish: function onFinish() { containerToFade.visible = false; } }); } isConfirmationDialogActive = true; onConfirmYes = yesCallback; onConfirmNo = noCallback; selectedConfirmationOptionIndex = 0; confirmationContentContainer = new Container(); var centerX = 380 + 1150 / 2; var centerY = 1020 + 890 / 2; confirmationContentContainer.x = centerX; confirmationContentContainer.y = centerY - 65; var referenceIndex = parentContainer.getChildIndex(referenceObject); parentContainer.addChildAt(confirmationContentContainer, referenceIndex + 1); var frame = LK.getAsset('finalBossConfirmationFrame', { anchorX: 0.5, anchorY: 0.5 }); confirmationContentContainer.addChild(frame); var shadowOffset = 4; var questionTextShadow = new Text2("Are you sure?", { size: 105, fill: 0x000000, align: 'center' }); questionTextShadow.anchor.set(0.5, 0.5); questionTextShadow.y = -80 + shadowOffset; questionTextShadow.x = shadowOffset; confirmationContentContainer.addChild(questionTextShadow); var questionText = new Text2("Are you sure?", { size: 120, fill: 0xb5ac01, align: 'center' }); questionText.anchor.set(0.5, 0.5); questionText.y = -80; confirmationContentContainer.addChild(questionText); var yesText = new Text2("Yes", { size: 85, fill: 0xFFFFFF, align: 'center' }); yesText.anchor.set(0.5, 0.5); yesText.x = -150; yesText.y = 80; confirmationContentContainer.addChild(yesText); var noText = new Text2("No", { size: 85, fill: 0xFFFFFF, align: 'center' }); noText.anchor.set(0.5, 0.5); noText.x = 150; noText.y = 80; confirmationContentContainer.addChild(noText); confirmationOptions = [yesText, noText]; updateConfirmationHighlight(); } function displayStatsForBoss(bossIndex) { console.log("--- displayStatsForBoss called for index: " + bossIndex + " ---"); while (currentBossDisplayElements.length > 0) { var el = currentBossDisplayElements.pop(); if (el && el.parent) { el.destroy(); } } if (bossIndex < 0 || bossIndex >= allBossData.length) { console.error("Invalid bossIndex for stats: " + bossIndex); return; } var bossData = allBossData[bossIndex]; if (!bossData) { console.error("No bossData found for index: " + bossIndex); return; } console.log("Displaying stats for boss: " + bossData.displayName); var viewport = miniGameViewport; var padding = 40; var bossStatDetailsContainer = new Container(); bossStatDetailsContainer.x = viewport.x; bossStatDetailsContainer.y = viewport.y + 60 + 80; game.addChild(bossStatDetailsContainer); currentBossDisplayElements.push(bossStatDetailsContainer); var bossImageWidth = viewport.width * 0.35; var bossImageHeight = (viewport.height - (viewport.y + 60 + 80 - bossStatDetailsContainer.y)) * 0.7; if (bossImageHeight > bossImageWidth * 1.5) { bossImageHeight = bossImageWidth * 1.5; } var bossImageX = padding + bossImageWidth / 2; var bossImageY = padding + bossImageHeight / 2; var bossAssetKeyToDisplay = bossData.cardAssetKey; if (!bossAssetKeyToDisplay) { console.warn("Boss " + bossData.displayName + " has an empty cardAssetKey. Using placeholder."); bossAssetKeyToDisplay = 'statsBossPlaceholder'; } var bossImage = LK.getAsset(bossAssetKeyToDisplay, { anchorX: 0.5, anchorY: 0.5, x: bossImageX, y: bossImageY, width: bossImageWidth, height: bossImageHeight }); bossStatDetailsContainer.addChild(bossImage); console.log("Boss image: " + bossAssetKeyToDisplay + " at x=" + bossImageX + ", y=" + bossImageY); // B. Teksty statystyk var statsTextX = bossImageX + bossImageWidth / 2 + 40; // Zwiększony odstęp od obrazka var currentTextY = padding + 30; // Startowa pozycja Y dla pierwszego tekstu statystyk (Best Score) // Możesz dostosować tę wartość, aby ładnie pasowała pod/obok obrazka var valueFontSize = 65; // Zwiększyłem trochę rozmiar dla wartości statystyk var lineSpacing = 115; // Zwiększyłem trochę odstęp między liniami var statsMaxWidth = viewport.width - statsTextX - padding * 1.5; var songStats = getSongStats(bossData.songMapKey); var bestScore = songStats.bestScore; var bestCombo = songStats.bestCombo; var defeatedStatus = bossUnlockProgress[bossData.id] ? "YES" : "NO"; var defeatedColor = bossUnlockProgress[bossData.id] ? 0x32CD32 : 0xFF4500; console.log("Stats values - Score: " + bestScore + ", Combo: " + bestCombo + ", Defeated: " + defeatedStatus); // Usunięto wyświetlanie "nameText" (nazwy bossa) // Best Score - teraz jako pierwszy tekst var scoreText = new Text2("Best Score: " + bestScore, { size: valueFontSize, fill: 0xFFFFFF, align: 'left', wordWrap: true, wordWrapWidth: statsMaxWidth }); scoreText.anchor.set(0, 0); scoreText.x = statsTextX; scoreText.y = currentTextY; bossStatDetailsContainer.addChild(scoreText); currentTextY += valueFontSize + 65; // Odstęp pod Best Score (dostosuj) // Best Combo var comboText = new Text2("Best Combo: " + bestCombo, { size: valueFontSize, fill: 0xFFFFFF, align: 'left', wordWrap: true, wordWrapWidth: statsMaxWidth }); comboText.anchor.set(0, 0); comboText.x = statsTextX; comboText.y = currentTextY; bossStatDetailsContainer.addChild(comboText); currentTextY += valueFontSize + 65; // Odstęp pod Best Combo (dostosuj) // Boss Defeated var defeatedText = new Text2("Defeated: ", { size: valueFontSize, fill: 0xFFFFFF, align: 'left' }); defeatedText.anchor.set(0, 0); defeatedText.x = statsTextX; defeatedText.y = currentTextY; bossStatDetailsContainer.addChild(defeatedText); var defeatedValue = new Text2(defeatedStatus, { size: valueFontSize, fill: defeatedColor, align: 'left' }); defeatedValue.anchor.set(0, 0); defeatedValue.x = statsTextX + defeatedText.width + 10; defeatedValue.y = currentTextY; bossStatDetailsContainer.addChild(defeatedValue); console.log("Stat texts (without boss name) added to container."); } function createPlayerHUD() { if (playerHUD && playerHUD.parent) { playerHUD.destroy(); } playerHUD = new Container(); playerHUD.alpha = 0; playerHUD.visible = false; gameUIContainer.addChild(playerHUD); var bg = playerHUD.addChild(LK.getAsset('playerHudBgAsset', { anchorX: 0.5, anchorY: 1, x: gameScreenWidth / 2, y: 2950, width: 900, height: 500, alpha: 1 })); playerHpBarFill = playerHUD.addChild(LK.getAsset('playerHpFill', { width: hpBarWidth, height: hpBarHeight, anchorX: 0, anchorY: 0.5, x: PLAYER_HP_BAR_X - hpBarWidth / 2, y: PLAYER_HP_BAR_Y })); var shieldFrames = []; for (var i = 1; i <= 11; i++) { shieldFrames.push(LK.getAsset('shield' + i, {})); } playerShieldAnimation = new SpriteAnimation({ frames: shieldFrames, frameDuration: 100, loop: true, anchorX: 0.5, anchorY: 0.5, x: gameScreenWidth / 2, y: 2700 }); playerShieldAnimation.rotation = Math.PI / 2; playerShieldAnimation.visible = false; playerHUD.addChild(playerShieldAnimation); } function createBossHUD() { if (bossHUD && bossHUD.parent) { bossHUD.destroy(); } bossHUD = new Container(); bossHUD.alpha = 0; bossHUD.visible = false; gameUIContainer.addChild(bossHUD); var bg = bossHUD.addChild(LK.getAsset('bossHudBgAsset', { anchorX: 0.5, anchorY: 0, x: gameScreenWidth / 2, y: -200, width: 900, height: 500, alpha: 0.8 })); bossHpBarFill = bossHUD.addChild(LK.getAsset('bossHpFill', { width: 600, height: 100, anchorX: 0, anchorY: 0.5, x: BOSS_HP_BAR_X - hpBarWidth / 2, y: BOSS_HP_BAR_Y })); } function forceStopAllMusic() { console.log("--- ROZPOCZYNAM WYMUSZONE ZATRZYMANIE MUZYKI ---"); console.log("Aktualny klucz muzyki (activeMusicKey):", activeMusicKey); console.log("Czy obiekt muzyki (activeMusicTrack) istnieje?", activeMusicTrack ? 'TAK' : 'NIE'); if (activeMusicTrack && typeof activeMusicTrack.stop === 'function') { console.log("Obiekt muzyki znaleziony. Wywoluje metode .stop()..."); activeMusicTrack.stop(); console.log("Metoda .stop() zostala wywolana."); } else { console.log("BŁĄD: Nie znaleziono obiektu muzyki lub nie ma on metody .stop()!"); } activeMusicTrack = null; activeMusicKey = null; console.log("Zmienne muzyki wyczyszczone. Muzyka powinna byc wylaczona."); console.log("--- ZAKONCZONO WYMUSZONE ZATRZYMANIE MUZYKI ---"); } function showMiniGameScreen() { currentScreenState = 'miniGameActive'; isMiniGameOver = false; miniGameScore = 0; miniGameObstacles = []; while (miniGameScreenElements.length > 0) { var el_mg_clear = miniGameScreenElements.pop(); if (el_mg_clear && el_mg_clear.parent) { el_mg_clear.destroy(); } } if (miniGamePlayer && miniGamePlayer.asset && miniGamePlayer.asset.parent) { miniGamePlayer.asset.destroy(); } miniGamePlayer = null; if (miniGameScoreText && miniGameScoreText.parent) { miniGameScoreText.destroy(); } miniGameScoreText = null; LK.stopMusic(); LK.playMusic('rollsouls'); if (!miniGameBackgroundInstance || !miniGameBackgroundInstance.parent) { miniGameBackgroundInstance = LK.getAsset('miniGameRollSoulsBg', {}); if (miniGameBackgroundInstance) { var faktorSkali = 0.8; var nowaSzerokoscTla = miniGameViewport.width * faktorSkali; var nowaWysokoscTla = miniGameViewport.height * faktorSkali; miniGameBackgroundInstance.width = nowaSzerokoscTla; miniGameBackgroundInstance.height = nowaWysokoscTla; miniGameBackgroundInstance.x = miniGameViewport.x + (miniGameViewport.width - nowaSzerokoscTla) / 2; miniGameBackgroundInstance.y = miniGameViewport.y + (miniGameViewport.height - nowaWysokoscTla) / 2; game.addChild(miniGameBackgroundInstance); } } if (miniGameBackgroundInstance) { miniGameBackgroundInstance.visible = true; miniGameBackgroundInstance.alpha = 0.7; if (!miniGameScreenElements.includes(miniGameBackgroundInstance)) { miniGameScreenElements.push(miniGameBackgroundInstance); } } MINI_GAME_LANE_HEIGHT = miniGameViewport.height / MINI_GAME_NUMBER_OF_LANES; MINI_GAME_LANE_Y_POSITIONS = []; for (var lane_idx = 0; lane_idx < MINI_GAME_NUMBER_OF_LANES; lane_idx++) { MINI_GAME_LANE_Y_POSITIONS.push(miniGameViewport.y + lane_idx * MINI_GAME_LANE_HEIGHT + MINI_GAME_LANE_HEIGHT / 2); } var playerFrames = [LK.getAsset('player_anim_1', {}), LK.getAsset('player_anim_2', {}), LK.getAsset('player_anim_3', {})]; var playerAnimation = new SpriteAnimation({ frames: playerFrames, frameDuration: 350, loop: true, anchorX: 0.5, anchorY: 0.5 }); miniGamePlayer = { lane: 1, y: MINI_GAME_LANE_Y_POSITIONS[1], x: miniGameViewport.x + 100, width: 50, height: 50, asset: playerAnimation }; playerAnimation.x = miniGamePlayer.x; playerAnimation.y = miniGamePlayer.y; game.addChild(playerAnimation); miniGameScreenElements.push(playerAnimation); var scoreTextInstance = new Text2("Score: 0", { size: 40, fill: 0xFFFFFF, align: 'left' }); scoreTextInstance.anchor.set(0, 0); scoreTextInstance.x = miniGameViewport.x + 20; scoreTextInstance.y = miniGameViewport.y + 20; game.addChild(scoreTextInstance); miniGameScreenElements.push(scoreTextInstance); miniGameScoreText = scoreTextInstance; lastMiniGameObstacleSpawnTime = Date.now(); currentMiniGameObjectSpeed = MINI_GAME_OBJECT_SPEED; miniGameTimeActive = 0; var glassAssetFromMainMenu = null; for (var i_glass = 0; i_glass < mainMenuScreenElements.length; i_glass++) { var el_glass_check = mainMenuScreenElements[i_glass]; if (el_glass_check && el_glass_check.x === miniGameViewport.x && el_glass_check.y === miniGameViewport.y && el_glass_check.width === miniGameViewport.width && el_glass_check.height === miniGameViewport.height && el_glass_check.alpha && Math.abs(el_glass_check.alpha - 0.3) < 0.01) { glassAssetFromMainMenu = el_glass_check; break; } } if (glassAssetFromMainMenu && glassAssetFromMainMenu.parent) { var parentContainer = glassAssetFromMainMenu.parent; parentContainer.removeChild(glassAssetFromMainMenu); parentContainer.addChild(glassAssetFromMainMenu); } var rewindButtonMiniGame = LK.getAsset('rewindbutton', { x: 350, y: gameScreenHeight / 2 + 650, anchorX: 0.5, anchorY: 0.5, interactive: true, cursor: "pointer" }); rewindButtonMiniGame.down = function () { exitMiniGameAndReturnToMainMenu(); }; game.addChild(rewindButtonMiniGame); miniGameScreenElements.push(rewindButtonMiniGame); } function showStatsScreen() { console.log("Showing Stats Screen - Full Setup"); while (statsScreenElements.length > 0) { var el = statsScreenElements.pop(); if (el && el.parent) { el.destroy(); } } while (currentBossDisplayElements.length > 0) { var cbdEl = currentBossDisplayElements.pop(); if (cbdEl && cbdEl.parent) { cbdEl.destroy(); } } initializeBossData(); // <<<< DODAJ TĘ LINIĘ NA POCZĄTKU FUNKCJI currentScreenState = 'statsScreen'; currentStatsBossIndex = 0; var glassStats = LK.getAsset('glass2', { x: miniGameViewport.x, y: miniGameViewport.y, width: miniGameViewport.width, height: miniGameViewport.height, alpha: 0.15, interactive: false }); game.addChild(glassStats); statsScreenElements.push(glassStats); var statsTitle = new Text2("PLAYER STATS", { size: 60, fill: 0xFFFFFF, align: 'center', stroke: 0x000000, strokeThickness: 4 }); statsTitle.anchor.set(0.5, 0.5); statsTitle.x = miniGameViewport.x + miniGameViewport.width / 2; statsTitle.y = miniGameViewport.y + 100; game.addChild(statsTitle); statsScreenElements.push(statsTitle); displayStatsForBoss(currentStatsBossIndex); // Przyciski nawigacyjne dla ekranu Stats var upButtonStats = LK.getAsset('upbutton', {}); upButtonStats.x = 210; upButtonStats.y = gameScreenHeight / 2 - 180; upButtonStats.anchor.set(0.5, 0.5); upButtonStats.interactive = true; upButtonStats.cursor = "pointer"; upButtonStats.down = function () { if (currentStatsBossIndex > 0) { currentStatsBossIndex--; displayStatsForBoss(currentStatsBossIndex); } }; game.addChild(upButtonStats); statsScreenElements.push(upButtonStats); var downButtonStats = LK.getAsset('downbutton', {}); downButtonStats.x = 210; downButtonStats.y = gameScreenHeight / 2 + 220; downButtonStats.anchor.set(0.5, 0.5); downButtonStats.interactive = true; downButtonStats.cursor = "pointer"; downButtonStats.down = function () { if (currentStatsBossIndex < allBossData.length - 1) { currentStatsBossIndex++; displayStatsForBoss(currentStatsBossIndex); } }; game.addChild(downButtonStats); statsScreenElements.push(downButtonStats); var rewindButtonStats = LK.getAsset('rewindbutton', { x: 350, y: gameScreenHeight / 2 + 650, anchorX: 0.5, anchorY: 0.5, interactive: true, cursor: "pointer" }); rewindButtonStats.down = function () { console.log("Rewind button pressed: Exiting Stats screen."); while (statsScreenElements.length > 0) { var elToDestroyStats = statsScreenElements.pop(); if (elToDestroyStats && elToDestroyStats.parent) { elToDestroyStats.destroy(); } } while (currentBossDisplayElements.length > 0) { var cbdElExit = currentBossDisplayElements.pop(); // Zmieniona nazwa zmiennej if (cbdElExit && cbdElExit.parent) { cbdElExit.destroy(); } } showMainMenu(); }; game.addChild(rewindButtonStats); statsScreenElements.push(rewindButtonStats); var playButtonStats = LK.getAsset('play', {}); playButtonStats.x = gameScreenWidth - 350; playButtonStats.y = gameScreenHeight / 2 - 240; playButtonStats.anchor.set(0.5, 0.5); playButtonStats.interactive = false; playButtonStats.alpha = 0.5; game.addChild(playButtonStats); statsScreenElements.push(playButtonStats); var stopButtonStats = LK.getAsset('stop', {}); stopButtonStats.x = gameScreenWidth - 350; stopButtonStats.y = gameScreenHeight / 2; stopButtonStats.anchor.set(0.5, 0.5); stopButtonStats.interactive = false; stopButtonStats.alpha = 0.5; game.addChild(stopButtonStats); statsScreenElements.push(stopButtonStats); var fightButtonStats = LK.getAsset('fight', {}); fightButtonStats.x = gameScreenWidth - 350; fightButtonStats.y = gameScreenHeight / 2 + 240; fightButtonStats.anchor.set(0.5, 0.5); fightButtonStats.interactive = false; fightButtonStats.alpha = 0.5; game.addChild(fightButtonStats); statsScreenElements.push(fightButtonStats); } function showEndlessIntro() { var introElements = []; var localIntroTimers = []; var comicPanelsContainer = null; var skipButton = null; function clearLocalIntroTimers() { localIntroTimers.forEach(function (timerId) { if (timerId) { LK.clearTimeout(timerId); } }); localIntroTimers = []; } function endEndlessIntroAndStartGame() { if (currentScreenState !== 'intro_endless' && currentScreenState !== 'transitioning_to_endless') { return; } currentScreenState = 'transitioning_to_endless'; clearLocalIntroTimers(); var elementsToFade = introElements.slice(); var fadedCount = 0; var totalToFade = elementsToFade.length; var onAllFadedOut = function onAllFadedOut() { elementsToFade.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); introElements = []; comicPanelsContainer = null; skipButton = null; initializeEndlessGameplay(false); }; if (totalToFade === 0) { onAllFadedOut(); return; } elementsToFade.forEach(function (el) { tween(el, { alpha: 0 }, { duration: 800, easing: tween.easeOut, onFinish: function onFinish() { fadedCount++; if (fadedCount === totalToFade) { onAllFadedOut(); } } }); }); } function displayPanelWithFadeIn(assetKey, positionConfig, durationMs, callback) { if (currentScreenState !== 'intro_endless' || !comicPanelsContainer) { return; } var panel = LK.getAsset(assetKey, { anchorX: 0.5, anchorY: 0.5, x: positionConfig.x, y: positionConfig.y, width: positionConfig.width, height: positionConfig.height, alpha: 0 }); comicPanelsContainer.addChild(panel); introElements.push(panel); tween(panel, { alpha: 1 }, { duration: durationMs, easing: tween.linear, onFinish: function onFinish() { if (callback && currentScreenState === 'intro_endless') { callback(); } } }); } function hideAndDestroyPanels(durationMs, callback) { var panelsToFade = introElements.filter(function (el) { return el !== skipButton && el !== comicPanelsContainer; }); if (panelsToFade.length === 0) { if (callback) { callback(); } return; } var fadedCount = 0; panelsToFade.forEach(function (p) { if (p && p.parent) { tween(p, { alpha: 0 }, { duration: durationMs, easing: tween.linear, onFinish: function onFinish() { var idx = introElements.indexOf(p); if (idx > -1) { introElements.splice(idx, 1); } if (p.parent) { p.destroy(); } fadedCount++; if (fadedCount === panelsToFade.length && callback && currentScreenState === 'intro_endless') { callback(); } } }); } else { fadedCount++; if (fadedCount === panelsToFade.length && callback && currentScreenState === 'intro_endless') { callback(); } } }); } currentScreenState = 'intro_endless'; game.setBackgroundColor(0x000000); comicPanelsContainer = new Container(); game.addChild(comicPanelsContainer); introElements.push(comicPanelsContainer); skipButton = new Text2("SKIP", { size: 60, fill: 0xBBBBBB, align: 'right' }); skipButton.anchor.set(1, 0); skipButton.x = gameScreenWidth - 40; skipButton.y = 40; skipButton.interactive = true; skipButton.cursor = "pointer"; game.addChild(skipButton); introElements.push(skipButton); skipButton.down = function () { if (currentScreenState === 'intro_endless') { endEndlessIntroAndStartGame(); } }; var panelWidth = gameScreenWidth * 0.85; var panelHeight = gameScreenHeight / 3 - 60; var panelX = gameScreenWidth / 2; var panelPositions = [{ x: panelX, y: panelHeight / 2 + 40, width: panelWidth, height: panelHeight }, { x: panelX, y: panelHeight * 1.5 + 60, width: panelWidth, height: panelHeight }, { x: panelX, y: panelHeight * 2.5 + 80, width: panelWidth, height: panelHeight }]; var endlessIntroAssetKeys = ['endless_intro_1', 'endless_intro_2', 'endless_intro_3', 'endless_intro_4', 'endless_intro_5', 'endless_intro_6']; function proceedToEndlessPhase2() { if (currentScreenState !== 'intro_endless') { return; } hideAndDestroyPanels(800, function () { if (currentScreenState !== 'intro_endless') { return; } displayPanelWithFadeIn(endlessIntroAssetKeys[3], panelPositions[0], 800, function () { localIntroTimers.push(LK.setTimeout(function () { displayPanelWithFadeIn(endlessIntroAssetKeys[4], panelPositions[1], 800, function () { localIntroTimers.push(LK.setTimeout(function () { displayPanelWithFadeIn(endlessIntroAssetKeys[5], panelPositions[2], 800, function () { localIntroTimers.push(LK.setTimeout(function () { if (currentScreenState === 'intro_endless') { endEndlessIntroAndStartGame(); } }, 3000)); }); }, 3000)); }); }, 3000)); }); }); } displayPanelWithFadeIn(endlessIntroAssetKeys[0], panelPositions[0], 800, function () { localIntroTimers.push(LK.setTimeout(function () { displayPanelWithFadeIn(endlessIntroAssetKeys[1], panelPositions[1], 800, function () { localIntroTimers.push(LK.setTimeout(function () { displayPanelWithFadeIn(endlessIntroAssetKeys[2], panelPositions[2], 800, function () { localIntroTimers.push(LK.setTimeout(proceedToEndlessPhase2, 3000)); }); }, 3000)); }); }, 3000)); }); } // Musimy też dodać tę pustą funkcję, aby uniknąć błędu. // W niej zbudujemy logikę ładowania tła, muzyki i generatora. function initializeEndlessGameplay(isRestart) { console.log("Endless: Inicjalizacja rozgrywki."); if (isRestart) { LK.stopMusic(); LK.playMusic('endless_intro_music', { loop: true }); } currentScreenState = 'endlessLoopActive'; currentEndlessDifficulty = 0.5; noteStreamStarted = false; resetGameState(); if (gameplayBackground && gameplayBackground.parent) { gameplayBackground.destroy(); } gameplayBackground = LK.getAsset('endless_background_asset', { x: 0, y: 0, width: gameScreenWidth, height: gameScreenHeight, alpha: 0 }); game.addChildAt(gameplayBackground, 0); var scenicContainer = new Container(); game.addChild(scenicContainer); setupEndlessEyes(); if (leftEye) { scenicContainer.addChild(leftEye); } if (rightEye) { scenicContainer.addChild(rightEye); } currentActiveRhythmMap = []; endlessTimelineOffsetMs = 10000 + noteTravelTime; createPlayerHUD(); playerCurrentHP = playerMaxHP; if (gameUIContainer) { gameUIContainer.visible = true; } // === ZMIANA TUTAJ: Ustawiamy scoreTxt i comboTxt na widoczne === if (scoreTxt) { scoreTxt.visible = true; scoreTxt.alpha = 0; // Będzie animowane w dół } if (comboTxt) { comboTxt.visible = true; comboTxt.alpha = 0; // Będzie animowane w dół } // === KONIEC ZMIANY === if (endlessTimerTxt && endlessTimerTxt.parent) { endlessTimerTxt.destroy(); } endlessTimerTxt = new Text2('Time: 00:00', { size: 80, fill: 0xFFFFFF, stroke: 0x000000, strokeThickness: 4, align: 'center' }); endlessTimerTxt.anchor.set(0.5, 0); endlessTimerTxt.x = gameScreenWidth / 2; endlessTimerTxt.y = 20; gameUIContainer.addChild(endlessTimerTxt); endlessTimerTxt.visible = true; endlessTimerTxt.alpha = 0; if (playerHUD) { playerHUD.visible = true; playerHUD.alpha = 0; } if (bossHUD) { bossHUD.visible = false; } setupGameplayElements(); if (staticHitFrame) { staticHitFrame.visible = true; staticHitFrame.alpha = 0; } if (staticPerfectLine) { staticPerfectLine.visible = true; staticPerfectLine.alpha = 0; } game.setChildIndex(scenicContainer, 1); LK.setTimeout(function () { if (leftEye && rightEye) { leftEye.visible = true; rightEye.visible = true; leftEye.play(); rightEye.play(); } }, 3000); var elementsToFadeIn = [gameplayBackground, playerHUD, endlessTimerTxt, staticHitFrame, staticPerfectLine, scoreTxt, comboTxt]; // Dodane scoreTxt i comboTxt var fadeDuration = 8000; elementsToFadeIn.forEach(function (el) { if (el) { var finalAlpha = el === gameplayBackground || el === staticHitFrame || el === scoreTxt ? 0.8 : 1.0; // Dostosuj alpha dla scoreTxt if (el === comboTxt) { finalAlpha = 0.5; } tween(el, { alpha: finalAlpha }, { duration: fadeDuration, easing: tween.easeIn }); } }); gameStartTime = Date.now(); endlessStartTime = gameStartTime; } function generateProceduralRhythmMap(durationSeconds, currentDifficulty, bpm) { var newMap = []; var currentChunkTimeMs = 0; var targetDurationMs = durationSeconds * 1000; var lastNoteTime = 0; var MIN_NOTE_GAP_MS = 290; // Zwiększona wartość dla większego bezpieczeństwa var INITIAL_TIME_MULTIPLIER = 8.0; var FINAL_TIME_MULTIPLIER = 1.0; var INTER_PATTERN_BASE_GAP_MS = 2200; // Twoja wartość, którą już zmieniłeś var patternLibrary = [{ notes: [{ type: 'tap', col: 0, delayMs: 150 }, { type: 'tap', col: 0, delayMs: 496 }, { type: 'swipe', col: 0, delayMs: 557 }, { type: 'tap', col: 1, delayMs: 913 }, { type: 'tap', col: 1, delayMs: 458 }, { type: 'swipe', col: 1, delayMs: 510 }, { type: 'tap', col: 2, delayMs: 941 }, { type: 'tap', col: 2, delayMs: 524 }, { type: 'swipe', col: 2, delayMs: 507 }] }, { notes: [{ type: 'swipe', col: 2, delayMs: 0 }, { type: 'swipe', col: 0, delayMs: 492 }, { type: 'swipe', col: 1, delayMs: 425 }, { type: 'swipe', col: 0, delayMs: 340 }, { type: 'swipe', col: 2, delayMs: 336 }, { type: 'tap', col: 1, delayMs: 268 }, { type: 'tap', col: 2, delayMs: 467 }, { type: 'tap', col: 1, delayMs: 418 }, { type: 'tap', col: 0, delayMs: 317 }, { type: 'tap', col: 1, delayMs: 389 }, { type: 'swipe', col: 1, delayMs: 236 }, { type: 'swipe', col: 0, delayMs: 459 }, { type: 'swipe', col: 1, delayMs: 465 }, { type: 'swipe', col: 2, delayMs: 373 }, { type: 'swipe', col: 1, delayMs: 352 }, { type: 'tap', col: 1, delayMs: 192 }, { type: 'tap', col: 2, delayMs: 443 }, { type: 'tap', col: 1, delayMs: 426 }, { type: 'tap', col: 0, delayMs: 391 }, { type: 'tap', col: 2, delayMs: 314 }] }, { notes: [{ type: 'swipe', col: 2, delayMs: 0 }, { type: 'swipe', col: 0, delayMs: 440 }, { type: 'swipe', col: 2, delayMs: 468 }, { type: 'swipe', col: 0, delayMs: 456 }, { type: 'swipe', col: 2, delayMs: 484 }, { type: 'swipe', col: 0, delayMs: 464 }, { type: 'swipe', col: 2, delayMs: 464 }, { type: 'swipe', col: 0, delayMs: 449 }, { type: 'swipe', col: 2, delayMs: 420 }, { type: 'tap', col: 0, delayMs: 313 }, { type: 'tap', col: 2, delayMs: 265 }, { type: 'tap', col: 0, delayMs: 468 }, { type: 'tap', col: 2, delayMs: 444 }, { type: 'tap', col: 0, delayMs: 376 }, { type: 'tap', col: 2, delayMs: 390 }, { type: 'tap', col: 1, delayMs: 189 }, { type: 'swipe', col: 1, delayMs: 468 }, { type: 'swipe', col: 0, delayMs: 460 }, { type: 'swipe', col: 1, delayMs: 229 }, { type: 'swipe', col: 2, delayMs: 278 }, { type: 'tap', col: 1, delayMs: 468 }, { type: 'tap', col: 2, delayMs: 439 }, { type: 'tap', col: 0, delayMs: 476 }] }, { notes: [{ type: 'tap', col: 0, delayMs: 0 }, { type: 'tap', col: 1, delayMs: 177 }, { type: 'tap', col: 2, delayMs: 264 }, { type: 'tap', col: 0, delayMs: 260 }, { type: 'tap', col: 1, delayMs: 206 }, { type: 'tap', col: 2, delayMs: 154 }, { type: 'tap', col: 2, delayMs: 293 }, { type: 'tap', col: 1, delayMs: 156 }, { type: 'tap', col: 0, delayMs: 160 }, { type: 'tap', col: 0, delayMs: 317 }, { type: 'tap', col: 0, delayMs: 393 }, { type: 'tap', col: 1, delayMs: 426 }, { type: 'tap', col: 2, delayMs: 345 }, { type: 'tap', col: 2, delayMs: 326 }, { type: 'tap', col: 1, delayMs: 249 }] }, { notes: [{ type: 'tap', col: 0, delayMs: 0 }, { type: 'swipe', col: 0, delayMs: 289 }, { type: 'tap', col: 0, delayMs: 270 }, { type: 'tap', col: 1, delayMs: 408 }, { type: 'swipe', col: 1, delayMs: 282 }, { type: 'tap', col: 1, delayMs: 320 }, { type: 'tap', col: 2, delayMs: 694 }, { type: 'swipe', col: 2, delayMs: 284 }, { type: 'tap', col: 2, delayMs: 339 }] }, { notes: [{ type: 'tap', col: 0, delayMs: 0 }, { type: 'tap', col: 1, delayMs: 251 }, { type: 'tap', col: 2, delayMs: 509 }, { type: 'swipe', col: 2, delayMs: 388 }, { type: 'swipe', col: 1, delayMs: 271 }, { type: 'swipe', col: 0, delayMs: 253 }, { type: 'tap', col: 0, delayMs: 727 }, { type: 'tap', col: 1, delayMs: 217 }, { type: 'tap', col: 2, delayMs: 226 }] }, { notes: [{ type: 'tap', col: 2, delayMs: 150 }, { type: 'tap', col: 2, delayMs: 491 }, { type: 'tap', col: 1, delayMs: 543 }, { type: 'tap', col: 1, delayMs: 477 }, { type: 'tap', col: 0, delayMs: 473 }, { type: 'tap', col: 0, delayMs: 526 }, { type: 'tap', col: 0, delayMs: 463 }, { type: 'tap', col: 0, delayMs: 573 }, { type: 'tap', col: 1, delayMs: 454 }, { type: 'tap', col: 0, delayMs: 503 }, { type: 'tap', col: 1, delayMs: 512 }, { type: 'tap', col: 0, delayMs: 435 }, { type: 'tap', col: 1, delayMs: 554 }] }, { notes: [{ type: 'swipe', col: 0, delayMs: 150 }, { type: 'swipe', col: 2, delayMs: 629 }, { type: 'swipe', col: 0, delayMs: 584 }, { type: 'swipe', col: 2, delayMs: 550 }, { type: 'swipe', col: 1, delayMs: 566 }, { type: 'swipe', col: 0, delayMs: 564 }, { type: 'swipe', col: 1, delayMs: 556 }, { type: 'swipe', col: 0, delayMs: 634 }] }, { notes: [{ type: 'tap', col: 0, delayMs: 150 }, { type: 'swipe', col: 2, delayMs: 541 }, { type: 'swipe', col: 2, delayMs: 513 }, { type: 'tap', col: 1, delayMs: 476 }, { type: 'swipe', col: 1, delayMs: 419 }, { type: 'swipe', col: 1, delayMs: 537 }, { type: 'tap', col: 2, delayMs: 433 }, { type: 'swipe', col: 0, delayMs: 533 }, { type: 'swipe', col: 0, delayMs: 488 }, { type: 'tap', col: 1, delayMs: 425 }, { type: 'tap', col: 2, delayMs: 401 }, { type: 'tap', col: 0, delayMs: 396 }] }, { notes: [{ type: 'tap', col: 2, delayMs: 150 }, { type: 'tap', col: 2, delayMs: 567 }, { type: 'tap', col: 2, delayMs: 498 }, { type: 'swipe', col: 0, delayMs: 491 }, { type: 'swipe', col: 1, delayMs: 504 }, { type: 'tap', col: 1, delayMs: 528 }, { type: 'tap', col: 2, delayMs: 459 }, { type: 'tap', col: 0, delayMs: 541 }, { type: 'tap', col: 0, delayMs: 802 }, { type: 'swipe', col: 1, delayMs: 827 }, { type: 'swipe', col: 1, delayMs: 812 }, { type: 'swipe', col: 2, delayMs: 467 }, { type: 'tap', col: 1, delayMs: 789 }, { type: 'tap', col: 1, delayMs: 449 }, { type: 'tap', col: 2, delayMs: 448 }, { type: 'tap', col: 0, delayMs: 425 }] }, { notes: [{ type: 'tap', col: 0, delayMs: 150 }, { type: 'tap', col: 1, delayMs: 590 }, { type: 'tap', col: 2, delayMs: 565 }, { type: 'tap', col: 2, delayMs: 573 }, { type: 'tap', col: 1, delayMs: 580 }, { type: 'tap', col: 0, delayMs: 591 }, { type: 'tap', col: 0, delayMs: 538 }, { type: 'tap', col: 1, delayMs: 541 }, { type: 'tap', col: 2, delayMs: 639 }] }, { notes: [{ type: 'swipe', col: 2, delayMs: 150 }, { type: 'tap', col: 1, delayMs: 500 }, { type: 'tap', col: 1, delayMs: 469 }, { type: 'swipe', col: 1, delayMs: 417 }, { type: 'tap', col: 1, delayMs: 563 }, { type: 'tap', col: 1, delayMs: 440 }, { type: 'swipe', col: 1, delayMs: 404 }, { type: 'tap', col: 2, delayMs: 616 }, { type: 'tap', col: 2, delayMs: 405 }, { type: 'swipe', col: 0, delayMs: 385 }, { type: 'tap', col: 0, delayMs: 596 }, { type: 'tap', col: 0, delayMs: 428 }] }, { notes: [{ type: 'tap', col: 0, delayMs: 150 }, { type: 'tap', col: 2, delayMs: 709 }, { type: 'swipe', col: 1, delayMs: 670 }, { type: 'swipe', col: 1, delayMs: 528 }, { type: 'tap', col: 0, delayMs: 744 }, { type: 'tap', col: 2, delayMs: 686 }, { type: 'swipe', col: 1, delayMs: 654 }, { type: 'swipe', col: 1, delayMs: 485 }, { type: 'tap', col: 0, delayMs: 783 }, { type: 'tap', col: 2, delayMs: 646 }, { type: 'tap', col: 1, delayMs: 703 }, { type: 'tap', col: 1, delayMs: 450 }] }, { notes: [{ type: 'swipe', col: 0, delayMs: 150 }, { type: 'swipe', col: 1, delayMs: 609 }, { type: 'swipe', col: 2, delayMs: 654 }, { type: 'swipe', col: 1, delayMs: 546 }, { type: 'swipe', col: 2, delayMs: 613 }, { type: 'tap', col: 2, delayMs: 658 }, { type: 'tap', col: 2, delayMs: 540 }, { type: 'tap', col: 2, delayMs: 484 }, { type: 'tap', col: 1, delayMs: 400 }] }, { notes: [{ type: 'swipe', col: 1, delayMs: 150 }, { type: 'tap', col: 0, delayMs: 603 }, { type: 'tap', col: 1, delayMs: 639 }, { type: 'tap', col: 2, delayMs: 683 }, { type: 'swipe', col: 2, delayMs: 438 }, { type: 'tap', col: 2, delayMs: 565 }, { type: 'tap', col: 1, delayMs: 638 }, { type: 'tap', col: 0, delayMs: 390 }, { type: 'swipe', col: 0, delayMs: 684 }, { type: 'tap', col: 0, delayMs: 595 }, { type: 'tap', col: 1, delayMs: 595 }, { type: 'tap', col: 2, delayMs: 619 }] }]; var difficultyProgress = Math.min(1, currentDifficulty / MAX_ENDLESS_DIFFICULTY); var multiplierRange = INITIAL_TIME_MULTIPLIER - FINAL_TIME_MULTIPLIER; var currentTimeMultiplier = FINAL_TIME_MULTIPLIER + multiplierRange * (1 - difficultyProgress); while (currentChunkTimeMs < targetDurationMs) { var patternIndex = Math.floor(Math.random() * patternLibrary.length); var chosenPattern = patternLibrary[patternIndex]; chosenPattern.notes.forEach(function (pNote) { var stretchedDelayMs = pNote.delayMs * currentTimeMultiplier; if (pNote.delayMs > 0) { currentChunkTimeMs += stretchedDelayMs; } // --- POPRAWIONA LOGIKA BEZPIECZEŃSTWA --- if (currentChunkTimeMs < lastNoteTime + MIN_NOTE_GAP_MS) { currentChunkTimeMs = lastNoteTime + MIN_NOTE_GAP_MS; } // --- KONIEC POPRAWKI --- var newNote = {}; newNote.time = currentChunkTimeMs; newNote.columnIndex = pNote.col; newNote.type = pNote.type; if (newNote.type === 'tap') { if (Math.random() < ENDLESS_TRAP_CHANCE) { newNote.type = 'trap'; } } if (pNote.type === 'swipe') { var swipeDirs = ['up', 'down', 'left', 'right']; newNote.swipeDir = swipeDirs[Math.floor(Math.random() * swipeDirs.length)]; } newMap.push(newNote); lastNoteTime = newNote.time; }); var stretchedInterPatternGap = INTER_PATTERN_BASE_GAP_MS * currentTimeMultiplier; currentChunkTimeMs += stretchedInterPatternGap; } return { map: newMap, duration: currentChunkTimeMs }; } function showIntro() { if (typeof introElements !== 'undefined' && introElements.forEach) { introElements.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); } introElements = []; var localIntroTimers = []; var introArrowObject = null; var isWaitingForUserClick = false; var comicPanelsContainer = null; var skipButton = null; function clearLocalIntroTimers(clearArrowPulse) { localIntroTimers.forEach(function (timerId) { if (timerId) { LK.clearTimeout(timerId); } }); localIntroTimers = []; if (clearArrowPulse && introArrowObject && introArrowObject.pulseTimerId) { LK.clearTimeout(introArrowObject.pulseTimerId); introArrowObject.pulseTimerId = null; } } if (typeof gameUIContainer !== 'undefined' && gameUIContainer) { gameUIContainer.visible = false; } if (typeof staticHitFrame !== 'undefined' && staticHitFrame) { staticHitFrame.visible = false; } if (typeof staticPerfectLine !== 'undefined' && staticPerfectLine) { staticPerfectLine.visible = false; } currentScreenState = 'intro'; game.setBackgroundColor(0x000000); comicPanelsContainer = new Container(); game.addChild(comicPanelsContainer); introElements.push(comicPanelsContainer); skipButton = new Text2("SKIP", { size: 60, fill: 0xBBBBBB, align: 'right' }); skipButton.anchor.set(1, 0); skipButton.x = gameScreenWidth - 40; skipButton.y = 40; skipButton.interactive = true; skipButton.cursor = "pointer"; game.addChild(skipButton); introElements.push(skipButton); skipButton.down = function () { if (currentScreenState === 'intro') { endIntroSequence(); } }; var panelWidth = gameScreenWidth * 0.85; var panelHeight = gameScreenHeight / 3 - 60; var panelX = gameScreenWidth / 2; var panelPositions = [{ x: panelX, y: panelHeight / 2 + 40, width: panelWidth, height: panelHeight }, { x: panelX, y: panelHeight * 1.5 + 60, width: panelWidth, height: panelHeight }, { x: panelX, y: panelHeight * 2.5 + 80, width: panelWidth, height: panelHeight }]; var introAssetKeys = ['intro_scene_1', 'intro_scene_2', 'intro_scene_3', 'intro_scene_4', 'intro_scene_5', 'intro_scene_6', 'intro_scene_7', 'intro_scene_8', 'intro_scene_9']; var introArrowAssetKey = 'intro_arrow_down'; var activePanelObjects = []; function endIntroSequence() { if (currentScreenState !== 'intro' && currentScreenState !== 'transitioning_to_menu') { return; } currentScreenState = 'transitioning_to_menu'; clearLocalIntroTimers(true); isWaitingForUserClick = false; var elementsToFade = []; if (comicPanelsContainer && comicPanelsContainer.parent) { elementsToFade.push(comicPanelsContainer); } if (skipButton && skipButton.parent) { elementsToFade.push(skipButton); } if (introArrowObject && introArrowObject.parent) { elementsToFade.push(introArrowObject); } var fadedCount = 0; var totalToFade = elementsToFade.length; var onAllFadedOut = function onAllFadedOut() { introElements.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); introElements = []; activePanelObjects = []; comicPanelsContainer = null; skipButton = null; introArrowObject = null; showMainMenu(1000); }; if (totalToFade === 0) { onAllFadedOut(); return; } elementsToFade.forEach(function (el) { tween(el, { alpha: 0 }, { duration: 800, easing: tween.easeOut, onFinish: function onFinish() { fadedCount++; if (fadedCount === totalToFade) { onAllFadedOut(); } } }); }); } function displayPanelWithFadeIn(assetKey, positionConfig, durationMs, callback) { if (currentScreenState !== 'intro' || !comicPanelsContainer) { return; } var panel = LK.getAsset(assetKey, { anchorX: 0.5, anchorY: 0.5, x: positionConfig.x, y: positionConfig.y, width: positionConfig.width, height: positionConfig.height, alpha: 0 }); comicPanelsContainer.addChild(panel); activePanelObjects.push(panel); tween(panel, { alpha: 1 }, { duration: durationMs, easing: tween.linear, onFinish: function onFinish() { if (callback && currentScreenState === 'intro') { callback(); } } }); } function hideAndDestroyPanels(panelsToProcess, durationMs, callback) { var panelsToFade = panelsToProcess.slice(); activePanelObjects = []; if (currentScreenState !== 'intro' && panelsToFade.length > 0) { panelsToFade.forEach(function (p) { if (p && p.parent) { p.destroy(); } }); if (callback) { callback(); } return; } if (panelsToFade.length === 0) { if (callback) { callback(); } return; } var fadedCount = 0; panelsToFade.forEach(function (p) { if (p && p.parent) { tween(p, { alpha: 0 }, { duration: durationMs, easing: tween.linear, onFinish: function onFinish() { if (p.parent) { p.destroy(); } fadedCount++; if (fadedCount === panelsToFade.length && callback && currentScreenState === 'intro') { callback(); } } }); } else { fadedCount++; if (fadedCount === panelsToFade.length && callback && currentScreenState === 'intro') { callback(); } } }); } function showArrowAndAwaitClick(actionOnClick) { if (currentScreenState !== 'intro') { return; } if (introArrowObject && introArrowObject.parent) { if (introArrowObject.pulseTimerId) { LK.clearTimeout(introArrowObject.pulseTimerId); } introArrowObject.destroy(); var idxOldArr = introElements.indexOf(introArrowObject); if (idxOldArr > -1) { introElements.splice(idxOldArr, 1); } introArrowObject = null; } isWaitingForUserClick = true; introArrowObject = LK.getAsset(introArrowAssetKey, { anchorX: 0.5, anchorY: 1, x: gameScreenWidth / 2, y: gameScreenHeight - 30, alpha: 0, interactive: true, cursor: "pointer" }); game.addChild(introArrowObject); introElements.push(introArrowObject); if (comicPanelsContainer && comicPanelsContainer.parent) { game.setChildIndex(introArrowObject, game.getChildIndex(comicPanelsContainer) + 1); } if (skipButton && skipButton.parent) { game.setChildIndex(skipButton, game.children.length - 1); } tween(introArrowObject, { alpha: 1 }, { duration: 500 }); var arrowPulseDir = 1; function pulseArrow() { if (!isWaitingForUserClick || !introArrowObject || !introArrowObject.parent || currentScreenState !== 'intro') { if (introArrowObject && introArrowObject.pulseTimerId) { LK.clearTimeout(introArrowObject.pulseTimerId); } if (introArrowObject) { introArrowObject.pulseTimerId = null; } return; } var targetScale = arrowPulseDir > 0 ? 1.15 : 1.0; arrowPulseDir *= -1; tween(introArrowObject.scale, { x: targetScale, y: targetScale }, { duration: 700, easing: tween.easeInOutQuad, onFinish: function onFinish() { if (isWaitingForUserClick && introArrowObject && introArrowObject.parent) { introArrowObject.pulseTimerId = LK.setTimeout(pulseArrow, 100); } } }); } introArrowObject.pulseTimerId = LK.setTimeout(pulseArrow, 500); var thisArrowInstance = introArrowObject; thisArrowInstance.down = function () { if (isWaitingForUserClick && currentScreenState === 'intro' && thisArrowInstance && thisArrowInstance.parent) { isWaitingForUserClick = false; if (thisArrowInstance.pulseTimerId) { LK.clearTimeout(thisArrowInstance.pulseTimerId); thisArrowInstance.pulseTimerId = null; } tween(thisArrowInstance, { alpha: 0 }, { duration: 200, onFinish: function onFinish() { if (thisArrowInstance.parent) { thisArrowInstance.destroy(); } var idx = introElements.indexOf(thisArrowInstance); if (idx > -1) { introElements.splice(idx, 1); } if (introArrowObject === thisArrowInstance) { introArrowObject = null; } } }); clearLocalIntroTimers(false); actionOnClick(); } }; } function proceedToPhase2() { if (currentScreenState !== 'intro') { return; } hideAndDestroyPanels(activePanelObjects.slice(), 800, function () { if (currentScreenState !== 'intro') { return; } displayPanelWithFadeIn(introAssetKeys[3], panelPositions[0], 800, function () { if (currentScreenState !== 'intro') { return; } localIntroTimers.push(LK.setTimeout(function () { if (currentScreenState !== 'intro') { return; } displayPanelWithFadeIn(introAssetKeys[4], panelPositions[1], 800, function () { if (currentScreenState !== 'intro') { return; } localIntroTimers.push(LK.setTimeout(function () { if (currentScreenState !== 'intro') { return; } displayPanelWithFadeIn(introAssetKeys[5], panelPositions[2], 800, function () { if (currentScreenState !== 'intro') { return; } localIntroTimers.push(LK.setTimeout(function () { if (currentScreenState === 'intro') { showArrowAndAwaitClick(proceedToPhase3); } }, 3000)); }); }, 3000)); }); }, 3000)); }); }); } function proceedToPhase3() { if (currentScreenState !== 'intro') { return; } hideAndDestroyPanels(activePanelObjects.slice(), 800, function () { if (currentScreenState !== 'intro') { return; } displayPanelWithFadeIn(introAssetKeys[6], panelPositions[0], 800, function () { if (currentScreenState !== 'intro') { return; } localIntroTimers.push(LK.setTimeout(function () { if (currentScreenState !== 'intro') { return; } displayPanelWithFadeIn(introAssetKeys[7], panelPositions[1], 800, function () { if (currentScreenState !== 'intro') { return; } localIntroTimers.push(LK.setTimeout(function () { if (currentScreenState !== 'intro') { return; } displayPanelWithFadeIn(introAssetKeys[8], panelPositions[2], 800, function () { if (currentScreenState !== 'intro') { return; } localIntroTimers.push(LK.setTimeout(function () { if (currentScreenState === 'intro') { endIntroSequence(); } }, 3000)); }); }, 3000)); }); }, 3000)); }); }); } displayPanelWithFadeIn(introAssetKeys[0], panelPositions[0], 800, function () { if (currentScreenState !== 'intro') { return; } localIntroTimers.push(LK.setTimeout(function () { if (currentScreenState !== 'intro') { return; } displayPanelWithFadeIn(introAssetKeys[1], panelPositions[1], 800, function () { if (currentScreenState !== 'intro') { return; } localIntroTimers.push(LK.setTimeout(function () { if (currentScreenState !== 'intro') { return; } displayPanelWithFadeIn(introAssetKeys[2], panelPositions[2], 800, function () { if (currentScreenState === 'intro') { showArrowAndAwaitClick(proceedToPhase2); } }); }, 3000)); }); }, 3000)); }); } function checkMiniGameCollisions() { if (!miniGamePlayer || !miniGamePlayer.asset || isMiniGameOver) { return; } for (var i = miniGameObstacles.length - 1; i >= 0; i--) { var obs = miniGameObstacles[i]; if (miniGameRectsIntersect(miniGamePlayer, obs)) { console.log("Game Over - Hit obstacle!"); isMiniGameOver = true; if (miniGamePlayer.asset) { miniGamePlayer.asset.tint = 0xFF0000; } return; } } } function miniGameRectsIntersect(r1Player, r2Object) { var r1Details = { x: r1Player.x, y: r1Player.y, width: r1Player.width, height: r1Player.height }; var r2Details = { x: r2Object.x, y: r2Object.y, width: r2Object.width, height: r2Object.height }; var r1left = r1Details.x - r1Details.width / 2; var r1right = r1Details.x + r1Details.width / 2; var r1top = r1Details.y - r1Details.height / 2; var r1bottom = r1Details.y + r1Details.height / 2; var r2left = r2Details.x - r2Details.width / 2; var r2right = r2Details.x + r2Details.width / 2; var r2top = r2Details.y - r2Details.height / 2; var r2bottom = r2Details.y + r2Details.height / 2; return !(r2left >= r1right || r2right <= r1left || r2top >= r1bottom || r2bottom <= r1top); } function setupEndlessEyes() { if (leftEye && leftEye.parent) { leftEye.destroy(); } if (rightEye && rightEye.parent) { rightEye.destroy(); } eyeFrameAssets = []; for (var i = 1; i <= 10; i++) { eyeFrameAssets.push('eyes' + i); } var leftEyeFrames = []; for (var i = 0; i < eyeFrameAssets.length; i++) { var frameAsset = LK.getAsset(eyeFrameAssets[i], {}); if (frameAsset) { leftEyeFrames.push(frameAsset); } } var rightEyeFrames = []; for (var i = 0; i < eyeFrameAssets.length; i++) { var frameAsset = LK.getAsset(eyeFrameAssets[i], {}); if (frameAsset) { rightEyeFrames.push(frameAsset); } } if (leftEyeFrames.length === 0 || rightEyeFrames.length === 0) { return; } var onOpenComplete = function onOpenComplete() { console.log("--- onOpenComplete (po otwarciu oka) ---"); console.log("Oko jest statyczne. Ustawiam timer na " + (5000 + Math.random() * 5000).toFixed(0) + "ms do nastepnego mrugniecia."); if (eyesBlinkTimer) { LK.clearTimeout(eyesBlinkTimer); } var randomInterval = 5000 + Math.random() * 5000; eyesBlinkTimer = LK.setTimeout(triggerEyesBlink, randomInterval); }; leftEye = new ManualAnimation({ frames: leftEyeFrames, frameDuration: 80, loop: false, x: gameScreenWidth / 2 - 520, y: 400, onComplete: onOpenComplete }); rightEye = new ManualAnimation({ frames: rightEyeFrames, frameDuration: 80, loop: false, x: gameScreenWidth / 2 + 520, y: 400, onComplete: onOpenComplete }); leftEye.anchor.set(0.5, 0.5); rightEye.anchor.set(0.5, 0.5); rightEye.scale.x = -1; leftEye.visible = false; rightEye.visible = false; } function triggerEyesBlink() { console.log("--- triggerEyesBlink START ---"); if (!leftEye || !rightEye || !leftEye.parent || !rightEye.parent) { return; } var pickAndSetNewEyeColor = function pickAndSetNewEyeColor() { var colors = [0x66FF66, 0x6666FF, 0xFFFF66, 0xFF66FF, 0x66FFFF, 0xFFFFFF, 0xFF0000]; var currentHex = (Math.floor(currentEyeColor.r) << 16) + (Math.floor(currentEyeColor.g) << 8) + Math.floor(currentEyeColor.b); var newHex; do { newHex = colors[Math.floor(Math.random() * colors.length)]; } while (newHex === currentHex && colors.length > 1); currentEyeColor.r = newHex >> 16 & 255; currentEyeColor.g = newHex >> 8 & 255; currentEyeColor.b = newHex & 255; }; var closingFrameNames = []; for (var i = 9; i >= 0; i--) { closingFrameNames.push(eyeFrameAssets[i]); } var openingFrameNames = eyeFrameAssets.slice(); var createFrameInstances = function createFrameInstances(frameNames) { var instances = []; for (var i = 0; i < frameNames.length; i++) { var asset = LK.getAsset(frameNames[i], {}); if (asset) { instances.push(asset); } } return instances; }; var openEyes = function openEyes(eye) { console.log("-> openEyes: START. Aktualna klatka: " + eye.currentFrame); eye.stop(); eye.frames = createFrameInstances(openingFrameNames); eye.loop = false; eye.onComplete = function () { console.log("-> openEyes: onComplete odpalony."); if (eye === rightEye) { if (eyesBlinkTimer) { LK.clearTimeout(eyesBlinkTimer); } var randomInterval = 5000 + Math.random() * 5000; eyesBlinkTimer = LK.setTimeout(triggerEyesBlink, randomInterval); } }; eye.gotoFrame(0); eye.play(); }; var closeEyes = function closeEyes(eye) { console.log("-> closeEyes: START. Aktualna klatka: " + eye.currentFrame); eye.stop(); eye.frames = createFrameInstances(closingFrameNames); eye.loop = false; eye.onComplete = function () { console.log("-> closeEyes: onComplete odpalony."); if (eye === leftEye) { pickAndSetNewEyeColor(); } openEyes(eye); }; eye.gotoFrame(0); eye.play(); }; closeEyes(leftEye); closeEyes(rightEye); } function runTutorialGameplay() { if (currentMainMenuMusicTrack && typeof currentMainMenuMusicTrack.stop === 'function') { currentMainMenuMusicTrack.stop(); } while (mainMenuScreenElements.length > 0) { var elemToDestroy = mainMenuScreenElements.pop(); if (elemToDestroy && elemToDestroy.parent) { elemToDestroy.destroy(); } } mainMenuItemTextObjects = []; if (typeof menuTextContainer !== 'undefined' && menuTextContainer && menuTextContainer.parent) { menuTextContainer.destroy(); // Zniszcz kontener, jeśli istnieje } menuTextContainer = null; // Zresetuj referencję isTutorialMode = true; currentScreenState = 'gameplay'; allSongData["TutorialTrack"] = tutorialSongData; currentFightingBossId = null; loadSong("TutorialTrack"); } function exitTutorialGameplay() { isTutorialMode = false; LK.stopMusic(); LK.playMusic('introMusic'); resetGameState(); if (gameplayBackground && gameplayBackground.parent) { gameplayBackground.destroy(); gameplayBackground = null; } if (scoreTxt) { scoreTxt.visible = true; } if (comboTxt) { comboTxt.visible = true; } if (gameUIContainer) { gameUIContainer.visible = false; } if (staticHitFrame) { staticHitFrame.visible = false; } if (staticPerfectLine) { staticPerfectLine.visible = false; } showMainMenu(); } function displayEndlessSummaryScreen(summaryData) { if (songSummaryContainer && songSummaryContainer.parent) { songSummaryContainer.destroy(); } songSummaryContainer = new Container(); game.addChild(songSummaryContainer); currentScreenState = 'songSummary'; saveEndlessStats(summaryData.time, summaryData.maxCombo); var bestStats = getEndlessStats(); var overlay = LK.getAsset('summaryOverlayAsset', { width: gameScreenWidth, height: gameScreenHeight, alpha: 0.7, interactive: true }); songSummaryContainer.addChild(overlay); var popupWidth = gameScreenWidth * 0.85; var popupHeight = 2000; var popupX = (gameScreenWidth - popupWidth) / 2; var popupY = (gameScreenHeight - popupHeight) / 2; var popupBackground = LK.getAsset('endlesspopup', { x: popupX, y: popupY, width: popupWidth, height: popupHeight }); songSummaryContainer.addChild(popupBackground); var titleText = new Text2("ENDLESS MODE OVER", { size: 70, fill: 0xffffff, align: 'center' }); var timeText = new Text2("Time Survived: " + formatTime(summaryData.time), { size: 50, fill: 0xFFFFFF, align: 'center' }); var bestTimeText = new Text2("Best Time: " + formatTime(bestStats.bestTime), { size: 50, fill: 0xFFFF00, align: 'center' }); var comboText = new Text2("Max Combo: " + summaryData.maxCombo, { size: 50, fill: 0xFFFFFF, align: 'center' }); var bestComboText = new Text2("Best Combo: " + bestStats.bestCombo, { size: 50, fill: 0xFFFF00, align: 'center' }); var missesText = new Text2("Notes Missed: " + summaryData.misses, { size: 50, fill: 0xFFFFFF, align: 'center' }); var allElements = [titleText, timeText, bestTimeText, comboText, bestComboText, missesText]; var totalContentHeight = 0; var v_gap = 70; allElements.forEach(function (el) { totalContentHeight += el.height + v_gap; }); var buttonHeight = 70; totalContentHeight += buttonHeight; var currentY = popupY + (popupHeight - totalContentHeight) / 2 + 30; allElements.forEach(function (element) { element.y = currentY + element.height / 2; element.x = popupX + popupWidth / 2; element.anchor.set(0.5, 0.5); songSummaryContainer.addChild(element); if (element === titleText) { element.y -= 60; } currentY += element.height + v_gap; }); var buttonWidth = popupWidth * 0.45; var buttonHeight = 90; var buttonY = currentY + buttonHeight / 2; var backButtonBg = LK.getAsset('summaryButtonBackgroundAsset', { x: popupX + (popupWidth / 2 - buttonWidth - 15), y: buttonY, width: buttonWidth, height: buttonHeight, interactive: true, cursor: "pointer" }); songSummaryContainer.addChild(backButtonBg); var backToMenuButton = new Text2("Back to Menu", { size: 50, fill: 0xFFD700, stroke: 0x000000, strokeThickness: 2 }); backToMenuButton.anchor.set(0.5, 0.5); backToMenuButton.x = backButtonBg.x + buttonWidth / 2; backToMenuButton.y = backButtonBg.y + buttonHeight / 2; songSummaryContainer.addChild(backToMenuButton); backButtonBg.down = function () { LK.stopMusic(); LK.playMusic('introMusic'); resetGameState(); if (songSummaryContainer && songSummaryContainer.parent) { songSummaryContainer.destroy(); } if (gameplayBackground && gameplayBackground.parent) { gameplayBackground.destroy(); } showMainMenu(); }; var restartButtonBg = LK.getAsset('summaryButtonBackgroundAsset', { x: popupX + (popupWidth / 2 + 15), y: buttonY, width: buttonWidth, height: buttonHeight, interactive: true, cursor: "pointer" }); songSummaryContainer.addChild(restartButtonBg); var restartButton = new Text2("Restart Endless", { size: 50, fill: 0xFFD700, stroke: 0x000000, strokeThickness: 2 }); restartButton.anchor.set(0.5, 0.5); restartButton.x = restartButtonBg.x + buttonWidth / 2; restartButton.y = restartButtonBg.y + buttonHeight / 2; songSummaryContainer.addChild(restartButton); restartButtonBg.down = function () { if (songSummaryContainer && songSummaryContainer.parent) { songSummaryContainer.destroy(); } if (gameplayBackground && gameplayBackground.parent) { gameplayBackground.destroy(); } initializeEndlessGameplay(true); }; if (gameUIContainer) { gameUIContainer.visible = false; } if (staticHitFrame) { staticHitFrame.visible = false; } if (staticPerfectLine) { staticPerfectLine.visible = false; } } // Game State & Rhythm Logic Variables var finalBossRawRhythmMap_Clean = [{ time: 9700, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 10288, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 10815, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 14926, type: 'hold', columnIndex: 0, duration: 757 }, { time: 16145, type: 'hold', columnIndex: 1, duration: 905 }, { time: 17467, type: 'hold', columnIndex: 2, duration: 2047 }, { time: 20226, type: 'tap', columnIndex: 0 }, { time: 21452, type: 'tap', columnIndex: 1 }, { time: 22026, type: 'tap', columnIndex: 2 }, { time: 24473, type: 'tap', columnIndex: 0 }, { time: 25814, type: 'tap', columnIndex: 1 }, { time: 27039, type: 'tap', columnIndex: 2 }, { time: 29019, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 30246, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 31296, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 32456, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 33673, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 34816, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 36296, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 36848, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 37219, type: 'tap', columnIndex: 2 }, { time: 38228, type: 'tap', columnIndex: 0 }, { time: 38765, type: 'tap', columnIndex: 2 }, { time: 39786, type: 'tap', columnIndex: 0 }, { time: 40300, type: 'tap', columnIndex: 1 }, { time: 40752, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 41054, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 42081, type: 'tap', columnIndex: 0 }, { time: 42521, type: 'tap', columnIndex: 1 }, { time: 42908, type: 'tap', columnIndex: 2 }, { time: 43256, type: 'tap', columnIndex: 1 }, { time: 44401, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 44802, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 45240, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 45541, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 46694, type: 'tap', columnIndex: 2 }, { time: 47137, type: 'tap', columnIndex: 1 }, { time: 47520, type: 'tap', columnIndex: 0 }, { time: 47843, type: 'tap', columnIndex: 1 }, { time: 48911, type: 'tap', columnIndex: 0 }, { time: 49329, type: 'tap', columnIndex: 1 }, { time: 49744, type: 'tap', columnIndex: 2 }, { time: 50041, type: 'tap', columnIndex: 1 }, { time: 51104, type: 'tap', columnIndex: 0 }, { time: 51512, type: 'tap', columnIndex: 0 }, { time: 51925, type: 'tap', columnIndex: 1 }, { time: 52285, type: 'tap', columnIndex: 2 }, { time: 53371, type: 'tap', columnIndex: 2 }, { time: 53818, type: 'tap', columnIndex: 2 }, { time: 54256, type: 'tap', columnIndex: 1 }, { time: 54520, type: 'tap', columnIndex: 0 }, { time: 55697, type: 'tap', columnIndex: 0 }, { time: 55944, type: 'tap', columnIndex: 1 }, { time: 56314, type: 'tap', columnIndex: 2 }, { time: 56794, type: 'tap', columnIndex: 1 }, { time: 57330, type: 'tap', columnIndex: 0 }, { time: 57886, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 58454, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 59018, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 59610, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 60148, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 60719, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 61264, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 61847, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 62389, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 62964, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 63563, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 64110, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 64646, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 65227, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 65494, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 65828, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 66375, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 66959, type: 'tap', columnIndex: 2 }, { time: 67488, type: 'tap', columnIndex: 1 }, { time: 67491, type: 'tap', columnIndex: 2 }, { time: 67746, type: 'tap', columnIndex: 2 }, { time: 68035, type: 'tap', columnIndex: 1 }, { time: 68605, type: 'tap', columnIndex: 0 }, { time: 68892, type: 'tap', columnIndex: 1 }, { time: 69165, type: 'tap', columnIndex: 2 }, { time: 69719, type: 'tap', columnIndex: 1 }, { time: 70289, type: 'tap', columnIndex: 0 }, { time: 70811, type: 'tap', columnIndex: 1 }, { time: 71150, type: 'tap', columnIndex: 2 }, { time: 71379, type: 'tap', columnIndex: 1 }, { time: 71697, type: 'tap', columnIndex: 0 }, { time: 71941, type: 'tap', columnIndex: 1 }, { time: 72220, type: 'tap', columnIndex: 2 }, { time: 72523, type: 'tap', columnIndex: 1 }, { time: 74003, type: 'tap', columnIndex: 1 }, { time: 74017, type: 'tap', columnIndex: 0 }, { time: 74029, type: 'tap', columnIndex: 2 }, { time: 74248, type: 'tap', columnIndex: 0 }, { time: 74252, type: 'tap', columnIndex: 1 }, { time: 74507, type: 'tap', columnIndex: 0 }, { time: 74508, type: 'tap', columnIndex: 2 }, { time: 74509, type: 'tap', columnIndex: 1 }, { time: 74754, type: 'tap', columnIndex: 2 }, { time: 74760, type: 'tap', columnIndex: 0 }, { time: 74760, type: 'tap', columnIndex: 1 }, { time: 75051, type: 'tap', columnIndex: 2 }, { time: 75053, type: 'tap', columnIndex: 0 }, { time: 75054, type: 'tap', columnIndex: 1 }, { time: 75356, type: 'tap', columnIndex: 0 }, { time: 75357, type: 'tap', columnIndex: 2 }, { time: 75363, type: 'tap', columnIndex: 1 }, { time: 75615, type: 'tap', columnIndex: 1 }, { time: 75616, type: 'tap', columnIndex: 0 }, { time: 75620, type: 'tap', columnIndex: 2 }, { time: 75890, type: 'tap', columnIndex: 2 }, { time: 76152, type: 'tap', columnIndex: 1 }, { time: 76398, type: 'tap', columnIndex: 0 }, { time: 76790, type: 'tap', columnIndex: 1 }, { time: 77011, type: 'tap', columnIndex: 2 }, { time: 77050, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 77267, type: 'tap', columnIndex: 1 }, { time: 77550, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 77793, type: 'tap', columnIndex: 2 }, { time: 78078, type: 'tap', columnIndex: 2 }, { time: 78360, type: 'tap', columnIndex: 1 }, { time: 78642, type: 'tap', columnIndex: 0 }, { time: 78909, type: 'tap', columnIndex: 1 }, { time: 79242, type: 'tap', columnIndex: 2 }, { time: 79520, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 79787, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 80069, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 80343, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 80602, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 80917, type: 'tap', columnIndex: 2 }, { time: 81187, type: 'tap', columnIndex: 1 }, { time: 81463, type: 'tap', columnIndex: 0 }, { time: 81720, type: 'tap', columnIndex: 1 }, { time: 81991, type: 'tap', columnIndex: 2 }, { time: 82340, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 82607, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 82883, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 83156, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 83435, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 83731, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 83985, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 84279, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 84546, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 84828, type: 'tap', columnIndex: 1 }, { time: 85074, type: 'tap', columnIndex: 2 }, { time: 85389, type: 'tap', columnIndex: 0 }, { time: 85714, type: 'tap', columnIndex: 1 }, { time: 86001, type: 'tap', columnIndex: 2 }, { time: 86267, type: 'tap', columnIndex: 1 }, { time: 86578, type: 'tap', columnIndex: 2 }, { time: 86847, type: 'tap', columnIndex: 1 }, { time: 87122, type: 'tap', columnIndex: 0 }, { time: 87367, type: 'tap', columnIndex: 1 }, { time: 87679, type: 'tap', columnIndex: 2 }, { time: 87953, type: 'tap', columnIndex: 1 }, { time: 88224, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 88513, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 88792, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 89086, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 89331, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 89631, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 89886, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 90178, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 90406, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 90761, type: 'tap', columnIndex: 2 }, { time: 91001, type: 'tap', columnIndex: 2 }, { time: 91308, type: 'tap', columnIndex: 1 }, { time: 91576, type: 'tap', columnIndex: 0 }, { time: 92085, type: 'tap', columnIndex: 1 }, { time: 92663, type: 'tap', columnIndex: 2 }, { time: 93261, type: 'tap', columnIndex: 1 }, { time: 93499, type: 'tap', columnIndex: 1 }, { time: 93796, type: 'tap', columnIndex: 2 }, { time: 94392, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 94842, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 95291, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 95551, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 95825, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 96091, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 96671, type: 'tap', columnIndex: 2 }, { time: 97286, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 97559, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 97800, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 98056, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 98346, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 98629, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 98935, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 99198, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 99515, type: 'tap', columnIndex: 2 }, { time: 100053, type: 'tap', columnIndex: 1 }, { time: 100623, type: 'tap', columnIndex: 0 }, { time: 101084, type: 'tap', columnIndex: 1 }, { time: 101648, type: 'tap', columnIndex: 2 }, { time: 102188, type: 'tap', columnIndex: 1 }, { time: 102603, type: 'tap', columnIndex: 0 }, { time: 103739, type: 'tap', columnIndex: 0 }, { time: 103954, type: 'tap', columnIndex: 0 }, { time: 103962, type: 'tap', columnIndex: 1 }, { time: 104173, type: 'tap', columnIndex: 2 }, { time: 104973, type: 'tap', columnIndex: 0 }, { time: 105129, type: 'tap', columnIndex: 1 }, { time: 105265, type: 'tap', columnIndex: 2 }, { time: 105913, type: 'tap', columnIndex: 0 }, { time: 106020, type: 'tap', columnIndex: 1 }, { time: 106154, type: 'tap', columnIndex: 2 }, { time: 106921, type: 'tap', columnIndex: 2 }, { time: 107112, type: 'tap', columnIndex: 1 }, { time: 107244, type: 'tap', columnIndex: 0 }, { time: 107479, type: 'tap', columnIndex: 0 }, { time: 107716, type: 'tap', columnIndex: 1 }, { time: 107822, type: 'tap', columnIndex: 2 }, { time: 108336, type: 'tap', columnIndex: 0 }, { time: 108457, type: 'tap', columnIndex: 1 }, { time: 108643, type: 'tap', columnIndex: 2 }, { time: 109487, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 109925, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 110332, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 110647, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 111130, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 111472, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 111650, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 111890, type: 'hold', columnIndex: 1, duration: 1518 }, { time: 113878, type: 'hold', columnIndex: 0, duration: 1842 }, { time: 116132, type: 'hold', columnIndex: 2, duration: 1822 }, { time: 118508, type: 'tap', columnIndex: 0 }, { time: 119109, type: 'tap', columnIndex: 1 }, { time: 119638, type: 'tap', columnIndex: 2 }, { time: 121215, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 121507, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 121838, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 122443, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 122720, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 123052, type: 'tap', columnIndex: 1 }, { time: 123293, type: 'tap', columnIndex: 2 }, { time: 123561, type: 'tap', columnIndex: 1 }, { time: 123831, type: 'tap', columnIndex: 0 }, { time: 124168, type: 'tap', columnIndex: 2 }, { time: 124205, type: 'tap', columnIndex: 0 }, { time: 124435, type: 'tap', columnIndex: 2 }, { time: 124520, type: 'tap', columnIndex: 0 }, { time: 124768, type: 'tap', columnIndex: 1 }, { time: 125016, type: 'tap', columnIndex: 2 }, { time: 125268, type: 'tap', columnIndex: 1 }, { time: 125527, type: 'tap', columnIndex: 0 }, { time: 125821, type: 'tap', columnIndex: 0 }, { time: 126078, type: 'tap', columnIndex: 1 }, { time: 126305, type: 'tap', columnIndex: 2 }, { time: 126581, type: 'tap', columnIndex: 0 }, { time: 126808, type: 'tap', columnIndex: 2 }, { time: 127165, type: 'tap', columnIndex: 0 }, { time: 127492, type: 'tap', columnIndex: 1 }, { time: 127715, type: 'tap', columnIndex: 2 }, { time: 128039, type: 'tap', columnIndex: 1 }, { time: 128339, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 128609, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 128913, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 129150, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 129435, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 129688, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 130072, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 130337, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 130584, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 130679, type: 'tap', columnIndex: 2 }, { time: 130934, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 131206, type: 'tap', columnIndex: 1 }, { time: 131461, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 131740, type: 'tap', columnIndex: 0 }, { time: 132014, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 132295, type: 'tap', columnIndex: 2 }, { time: 132555, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 132877, type: 'tap', columnIndex: 1 }, { time: 133149, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 133449, type: 'tap', columnIndex: 0 }, { time: 133708, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 134022, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 134255, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 134545, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 134754, type: 'tap', columnIndex: 1 }, { time: 135033, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 135369, type: 'tap', columnIndex: 2 }, { time: 135670, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 135945, type: 'tap', columnIndex: 1 }, { time: 136229, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 136458, type: 'tap', columnIndex: 0 }, { time: 136771, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 137024, type: 'tap', columnIndex: 2 }, { time: 137357, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 137784, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 138105, type: 'tap', columnIndex: 0 }, { time: 138315, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 138591, type: 'tap', columnIndex: 1 }, { time: 138815, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 139305, type: 'tap', columnIndex: 2 }, { time: 139853, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 140388, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 140704, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 140932, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 141180, type: 'tap', columnIndex: 2 }, { time: 141517, type: 'tap', columnIndex: 1 }, { time: 141857, type: 'tap', columnIndex: 2 }, { time: 142141, type: 'tap', columnIndex: 1 }, { time: 142442, type: 'tap', columnIndex: 2 }, { time: 142733, type: 'tap', columnIndex: 1 }, { time: 142999, type: 'tap', columnIndex: 2 }, { time: 143252, type: 'tap', columnIndex: 0 }, { time: 143535, type: 'tap', columnIndex: 1 }, { time: 143749, type: 'tap', columnIndex: 0 }, { time: 144014, type: 'tap', columnIndex: 1 }, { time: 144307, type: 'tap', columnIndex: 0 }, { time: 144598, type: 'tap', columnIndex: 1 }, { time: 144843, type: 'tap', columnIndex: 0 }, { time: 145160, type: 'tap', columnIndex: 1 }, { time: 145277, type: 'tap', columnIndex: 0 }, { time: 145537, type: 'tap', columnIndex: 1 }, { time: 145823, type: 'tap', columnIndex: 2 }, { time: 146059, type: 'tap', columnIndex: 1 }, { time: 146330, type: 'tap', columnIndex: 2 }, { time: 146634, type: 'tap', columnIndex: 1 }, { time: 146904, type: 'tap', columnIndex: 2 }, { time: 147195, type: 'tap', columnIndex: 1 }, { time: 147486, type: 'tap', columnIndex: 2 }, { time: 147712, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 147986, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 148309, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 148537, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 148875, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 149146, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 149440, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 210000, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 210311, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 210674, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 211004, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 211348, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 211664, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 212022, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 212322, type: 'tap', columnIndex: 2 }, { time: 212663, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 213061, type: 'tap', columnIndex: 1 }, { time: 213393, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 213734, type: 'tap', columnIndex: 1 }, { time: 214047, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 214396, type: 'tap', columnIndex: 1 }, { time: 214735, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 215083, type: 'tap', columnIndex: 0 }, { time: 215416, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 215767, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 216140, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 216472, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 216863, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 217177, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 217520, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 217966, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 218227, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 218583, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 218874, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 219227, type: 'tap', columnIndex: 2 }, { time: 219583, type: 'tap', columnIndex: 1 }, { time: 219926, type: 'tap', columnIndex: 0 }, { time: 220237, type: 'tap', columnIndex: 1 }, { time: 220602, type: 'tap', columnIndex: 0 }, { time: 220938, type: 'tap', columnIndex: 1 }, { time: 221269, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 221633, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 222001, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 222351, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 222714, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 223038, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 223361, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 223681, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 224042, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 224373, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 224734, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 225059, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 225379, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 225734, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 226087, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 226405, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 226751, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 227120, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 227451, type: 'tap', columnIndex: 2 }, { time: 227776, type: 'tap', columnIndex: 2 }, { time: 228131, type: 'tap', columnIndex: 1 }, { time: 228495, type: 'tap', columnIndex: 1 }, { time: 228814, type: 'tap', columnIndex: 0 }, { time: 229152, type: 'tap', columnIndex: 1 }, { time: 229447, type: 'tap', columnIndex: 2 }, { time: 229783, type: 'tap', columnIndex: 1 }, { time: 230173, type: 'tap', columnIndex: 0 }, { time: 230476, type: 'tap', columnIndex: 1 }, { time: 230858, type: 'tap', columnIndex: 2 }, { time: 231177, type: 'tap', columnIndex: 1 }, { time: 231525, type: 'tap', columnIndex: 0 }, { time: 231908, type: 'tap', columnIndex: 2 }, { time: 232185, type: 'tap', columnIndex: 0 }, { time: 232549, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 232988, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 233293, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 233627, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 233966, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 234326, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 234630, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 234973, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 235335, type: 'tap', columnIndex: 0 }, { time: 235692, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 236036, type: 'tap', columnIndex: 0 }, { time: 236372, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 236707, type: 'tap', columnIndex: 0 }, { time: 237074, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 237341, type: 'tap', columnIndex: 0 }, { time: 237718, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 238076, type: 'tap', columnIndex: 0 }, { time: 238433, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 238782, type: 'tap', columnIndex: 0 }, { time: 239102, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 239807, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 240147, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 240552, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 240836, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 241167, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 241491, type: 'tap', columnIndex: 1 }, { time: 241823, type: 'tap', columnIndex: 2 }, { time: 242167, type: 'tap', columnIndex: 1 }, { time: 242545, type: 'tap', columnIndex: 0 }, { time: 242868, type: 'tap', columnIndex: 1 }, { time: 243208, type: 'tap', columnIndex: 2 }, { time: 243902, type: 'tap', columnIndex: 0 }, { time: 244632, type: 'tap', columnIndex: 1 }, { time: 245289, type: 'tap', columnIndex: 2 }, { time: 245980, type: 'tap', columnIndex: 0 }, { time: 246667, type: 'tap', columnIndex: 1 }, { time: 247321, type: 'tap', columnIndex: 2 }, { time: 248011, type: 'tap', columnIndex: 0 }, { time: 248648, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 249044, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 249414, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 249738, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 250063, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 250428, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 250768, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 251096, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 251450, type: 'tap', columnIndex: 2 }, { time: 251787, type: 'tap', columnIndex: 1 }, { time: 252147, type: 'tap', columnIndex: 0 }, { time: 252495, type: 'tap', columnIndex: 1 }, { time: 252836, type: 'tap', columnIndex: 0 }, { time: 253145, type: 'tap', columnIndex: 1 }, { time: 253543, type: 'tap', columnIndex: 2 }, { time: 253857, type: 'tap', columnIndex: 1 }, { time: 254198, type: 'tap', columnIndex: 0 }, { time: 255968, type: 'tap', columnIndex: 0 }, { time: 256358, type: 'tap', columnIndex: 1 }, { time: 257072, type: 'tap', columnIndex: 2 }, { time: 258197, type: 'tap', columnIndex: 1 }, { time: 258960, type: 'tap', columnIndex: 2 }, { time: 259660, type: 'tap', columnIndex: 0 }, { time: 260921, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 261526, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 262099, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 262500, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 263733, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 264384, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 264847, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 265253, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 265912, type: 'tap', columnIndex: 2 }, { time: 266312, type: 'tap', columnIndex: 1 }, { time: 266613, type: 'tap', columnIndex: 0 }, { time: 267135, type: 'tap', columnIndex: 1 }, { time: 267905, type: 'tap', columnIndex: 2 }, { time: 268660, type: 'tap', columnIndex: 1 }, { time: 269306, type: 'tap', columnIndex: 0 }, { time: 270677, type: 'tap', columnIndex: 2 }, { time: 271369, type: 'tap', columnIndex: 0 }, { time: 271727, type: 'tap', columnIndex: 1 }, { time: 272079, type: 'tap', columnIndex: 2 }, { time: 272703, type: 'tap', columnIndex: 0 }, { time: 273428, type: 'tap', columnIndex: 1 }, { time: 274716, type: 'tap', columnIndex: 2 }, { time: 275394, type: 'tap', columnIndex: 1 }, { time: 275790, type: 'tap', columnIndex: 0 }, { time: 276257, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 276563, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 276840, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 277210, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 277535, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 277882, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 278190, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 278553, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 278866, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 279188, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 279540, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 279895, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 280264, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 280586, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 280941, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 281253, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 281603, type: 'tap', columnIndex: 2 }, { time: 281955, type: 'tap', columnIndex: 1 }, { time: 282314, type: 'tap', columnIndex: 2 }, { time: 282641, type: 'tap', columnIndex: 0 }, { time: 283011, type: 'tap', columnIndex: 1 }, { time: 283318, type: 'tap', columnIndex: 2 }, { time: 283696, type: 'tap', columnIndex: 0 }, { time: 284026, type: 'tap', columnIndex: 1 }, { time: 284352, type: 'tap', columnIndex: 2 }, { time: 284718, type: 'tap', columnIndex: 2 }, { time: 285088, type: 'tap', columnIndex: 0 }, { time: 285434, type: 'tap', columnIndex: 0 }, { time: 285761, type: 'tap', columnIndex: 1 }, { time: 286097, type: 'tap', columnIndex: 1 }, { time: 286429, type: 'tap', columnIndex: 0 }, { time: 286797, type: 'tap', columnIndex: 0 }, { time: 287081, type: 'tap', columnIndex: 2 }, { time: 287426, type: 'tap', columnIndex: 1 }, { time: 287774, type: 'tap', columnIndex: 2 }, { time: 288113, type: 'tap', columnIndex: 1 }, { time: 288443, type: 'tap', columnIndex: 2 }, { time: 288822, type: 'tap', columnIndex: 0 }, { time: 289141, type: 'tap', columnIndex: 2 }, { time: 289509, type: 'tap', columnIndex: 0 }, { time: 289856, type: 'tap', columnIndex: 1 }, { time: 290200, type: 'tap', columnIndex: 0 }, { time: 290568, type: 'tap', columnIndex: 1 }, { time: 290870, type: 'tap', columnIndex: 0 }, { time: 291213, type: 'tap', columnIndex: 1 }, { time: 291465, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 291896, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 292261, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 292597, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 292937, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 293273, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 293636, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 293940, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 294309, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 294663, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 295004, type: 'tap', columnIndex: 2 }, { time: 295365, type: 'tap', columnIndex: 1 }, { time: 295667, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 296001, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 296348, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 296694, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 297044, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 297378, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 297722, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 298071, type: 'tap', columnIndex: 2 }]; var allSongData = { "FinalBossTrack": { musicAsset: "Finalbattle", bossAssetKey: 'finalBossAsset', backgroundAssetKey: 'finalBossBgAsset', config: { playerMaxHP: 30, bossMaxHP: 750 }, rawRhythmMap: finalBossRawRhythmMap_Clean }, "NoizboyTrack": { musicAsset: 'Noizboy', bossAssetKey: 'Boss3', config: { playerMaxHP: 10, bossMaxHP: 220 }, rawRhythmMap: [{ time: 12000, type: "tap", columnIndex: 0 }, { time: 12613, type: "tap", columnIndex: 1 }, { time: 13148, type: "tap", columnIndex: 0 }, { time: 13759, type: "tap", columnIndex: 1 }, { time: 14293, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 14860, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 15437, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 15960, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 16561, type: "tap", columnIndex: 2 }, { time: 17133, type: "tap", columnIndex: 1 }, { time: 17647, type: "tap", columnIndex: 0 }, { time: 18180, type: "tap", columnIndex: 0 }, { time: 18859, type: "tap", columnIndex: 1 }, { time: 19422, type: "tap", columnIndex: 0 }, { time: 20010, type: "tap", columnIndex: 1 }, { time: 20272, type: "tap", columnIndex: 2 }, { time: 20609, type: "tap", columnIndex: 2 }, { time: 20840, type: "tap", columnIndex: 2 }, { time: 21186, type: "swipe", columnIndex: 0, swipeDir: "down" }, { time: 21829, type: "swipe", columnIndex: 0, swipeDir: "down" }, { time: 22364, type: "swipe", columnIndex: 1, swipeDir: "left" }, { time: 22935, type: "swipe", columnIndex: 1, swipeDir: "left" }, { time: 23517, type: "tap", columnIndex: 1 }, { time: 23812, type: "tap", columnIndex: 1 }, { time: 24063, type: "tap", columnIndex: 2 }, { time: 24415, type: "tap", columnIndex: 2 }, { time: 24678, type: "tap", columnIndex: 0 }, { time: 24965, type: "tap", columnIndex: 0 }, { time: 25234, type: "tap", columnIndex: 1 }, { time: 25846, type: "tap", columnIndex: 2 }, { time: 26440, type: "tap", columnIndex: 2 }, { time: 27003, type: "tap", columnIndex: 1 }, { time: 27535, type: "tap", columnIndex: 1 }, { time: 28133, type: "tap", columnIndex: 0 }, { time: 28680, type: "tap", columnIndex: 0 }, { time: 29225, type: "tap", columnIndex: 0 }, { time: 29846, type: "tap", columnIndex: 0 }, { time: 30459, type: "swipe", columnIndex: 0, swipeDir: "right" }, { time: 31100, type: "swipe", columnIndex: 1, swipeDir: "up" }, { time: 31660, type: "swipe", columnIndex: 2, swipeDir: "left" }, { time: 32775, type: "swipe", columnIndex: 2, swipeDir: "down" }, { time: 33347, type: "swipe", columnIndex: 1, swipeDir: "up" }, { time: 33930, type: "swipe", columnIndex: 0, swipeDir: "right" }, { time: 35058, type: "tap", columnIndex: 2 }, { time: 35640, type: "tap", columnIndex: 1 }, { time: 36187, type: "tap", columnIndex: 2 }, { time: 36722, type: "tap", columnIndex: 1 }, { time: 37385, type: "tap", columnIndex: 0 }, { time: 37928, type: "tap", columnIndex: 0 }, { time: 38148, type: "tap", columnIndex: 0 }, { time: 38502, type: "tap", columnIndex: 0 }, { time: 39022, type: "tap", columnIndex: 1 }, { time: 39657, type: "tap", columnIndex: 2 }, { time: 40209, type: "tap", columnIndex: 2 }, { time: 40800, type: "tap", columnIndex: 0 }, { time: 41347, type: "tap", columnIndex: 0 }, { time: 41963, type: "swipe", columnIndex: 0, swipeDir: "down" }, { time: 42496, type: "tap", columnIndex: 0 }, { time: 43113, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 43723, type: "tap", columnIndex: 0 }, { time: 44318, type: "swipe", columnIndex: 1, swipeDir: "right" }, { time: 44871, type: "swipe", columnIndex: 1, swipeDir: "right" }, { time: 45456, type: "tap", columnIndex: 1 }, { time: 45996, type: "tap", columnIndex: 1 }, { time: 46548, type: "swipe", columnIndex: 0, swipeDir: "left" }, { time: 47158, type: "swipe", columnIndex: 0, swipeDir: "left" }, { time: 47720, type: "tap", columnIndex: 2 }, { time: 48324, type: "tap", columnIndex: 2 }, { time: 48833, type: "swipe", columnIndex: 2, swipeDir: "down" }, { time: 49449, type: "swipe", columnIndex: 2, swipeDir: "down" }, { time: 50039, type: "tap", columnIndex: 0 }, { time: 50616, type: "tap", columnIndex: 0 }, { time: 51149, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 51781, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 52401, type: "tap", columnIndex: 2 }, { time: 52729, type: "tap", columnIndex: 2 }, { time: 53030, type: "tap", columnIndex: 2 }, { time: 53306, type: "tap", columnIndex: 2 }, { time: 53560, type: "tap", columnIndex: 1 }, { time: 54118, type: "tap", columnIndex: 2 }, { time: 54687, type: "tap", columnIndex: 1 }, { time: 55274, type: "tap", columnIndex: 2 }, { time: 55842, type: "tap", columnIndex: 1 }, { time: 56416, type: "swipe", columnIndex: 0, swipeDir: "left" }, { time: 57066, type: "swipe", columnIndex: 1, swipeDir: "right" }, { time: 57597, type: "tap", columnIndex: 2 }, { time: 58182, type: "swipe", columnIndex: 0, swipeDir: "down" }, { time: 58773, type: "tap", columnIndex: 2 }, { time: 59339, type: "swipe", columnIndex: 1, swipeDir: "up" }, { time: 59894, type: "tap", columnIndex: 1 }, { time: 60459, type: "tap", columnIndex: 2 }, { time: 61083, type: "tap", columnIndex: 1 }, { time: 61659, type: "tap", columnIndex: 2 }, { time: 62221, type: "tap", columnIndex: 0 }, { time: 62754, type: "tap", columnIndex: 1 }, { time: 68064, type: "hold", columnIndex: 1, duration: 1227 }, { time: 69302, type: "hold", columnIndex: 2, duration: 1134 }, { time: 70476, type: "hold", columnIndex: 0, duration: 1249 }, { time: 71721, type: "hold", columnIndex: 1, duration: 1188 }, { time: 72898, type: "hold", columnIndex: 2, duration: 1232 }, { time: 74104, type: "hold", columnIndex: 0, duration: 1277 }, { time: 75409, type: "hold", columnIndex: 1, duration: 965 }, { time: 76370, type: "hold", columnIndex: 2, duration: 1539 }, { time: 78101, type: "hold", columnIndex: 1, duration: 1002 }, { time: 79259, type: "hold", columnIndex: 0, duration: 1222 }, { time: 80575, type: "hold", columnIndex: 1, duration: 1071 }, { time: 81723, type: "hold", columnIndex: 2, duration: 884 }, { time: 82719, type: "swipe", columnIndex: 0, swipeDir: "right" }, { time: 83490, type: "hold", columnIndex: 2, duration: 1150 }, { time: 84679, type: "swipe", columnIndex: 0, swipeDir: "left" }, { time: 85134, type: "hold", columnIndex: 1, duration: 1173 }, { time: 86436, type: "tap", columnIndex: 0 }, { time: 86983, type: "tap", columnIndex: 1 }, { time: 87567, type: "tap", columnIndex: 0 }, { time: 88162, type: "tap", columnIndex: 0 }, { time: 88727, type: "tap", columnIndex: 1 }, { time: 89296, type: "tap", columnIndex: 1 }, { time: 89880, type: "tap", columnIndex: 2 }, { time: 90438, type: "tap", columnIndex: 2 }, { time: 90998, type: "tap", columnIndex: 1 }, { time: 91591, type: "tap", columnIndex: 1 }, { time: 92159, type: "tap", columnIndex: 1 }, { time: 92717, type: "tap", columnIndex: 1 }, { time: 93030, type: "tap", columnIndex: 2 }, { time: 93403, type: "tap", columnIndex: 0 }, { time: 93950, type: "tap", columnIndex: 1 }, { time: 94528, type: "tap", columnIndex: 0 }, { time: 95074, type: "tap", columnIndex: 1 }, { time: 95304, type: "tap", columnIndex: 2 }, { time: 95642, type: "tap", columnIndex: 0 }, { time: 96220, type: "tap", columnIndex: 1 }, { time: 96811, type: "tap", columnIndex: 2 }, { time: 97429, type: "tap", columnIndex: 1 }, { time: 97926, type: "tap", columnIndex: 2 }] }, "GoblopBossTrack": { musicAsset: "Goblop", bossAssetKey: 'Boss2_Asset', config: { playerMaxHP: 15, bossMaxHP: 200 }, rawRhythmMap: [{ time: 7000, type: "tap", columnIndex: 0 }, { time: 7637, type: "tap", columnIndex: 1 }, { time: 8205, type: "tap", columnIndex: 2 }, { time: 8783, type: "tap", columnIndex: 2 }, { time: 9355, type: "tap", columnIndex: 0 }, { time: 9966, type: "tap", columnIndex: 1 }, { time: 10584, type: "tap", columnIndex: 0 }, { time: 11124, type: "tap", columnIndex: 0 }, { time: 11668, type: "tap", columnIndex: 0 }, { time: 12254, type: "tap", columnIndex: 1 }, { time: 12833, type: "tap", columnIndex: 2 }, { time: 13428, type: "tap", columnIndex: 1 }, { time: 14026, type: "hold", columnIndex: 1, duration: 1205 }, { time: 15270, type: "hold", columnIndex: 2, duration: 1028 }, { time: 16918, type: "tap", columnIndex: 0 }, { time: 17481, type: "tap", columnIndex: 1 }, { time: 18120, type: "tap", columnIndex: 0 }, { time: 18697, type: "tap", columnIndex: 1 }, { time: 19238, type: "swipe", columnIndex: 0, swipeDir: "right" }, { time: 19853, type: "tap", columnIndex: 1 }, { time: 20442, type: "swipe", columnIndex: 0, swipeDir: "down" }, { time: 21008, type: "tap", columnIndex: 2 }, { time: 21561, type: "swipe", columnIndex: 2, swipeDir: "left" }, { time: 22225, type: "tap", columnIndex: 2 }, { time: 22794, type: "swipe", columnIndex: 2, swipeDir: "up" }, { time: 23316, type: "tap", columnIndex: 2 }, { time: 23933, type: "swipe", columnIndex: 1, swipeDir: "left" }, { time: 24538, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 25132, type: "tap", columnIndex: 1 }, { time: 25655, type: "tap", columnIndex: 2 }, { time: 26261, type: "tap", columnIndex: 0 }, { time: 26840, type: "tap", columnIndex: 1 }, { time: 27382, type: "tap", columnIndex: 2 }, { time: 28000, type: "tap", columnIndex: 1 }, { time: 28617, type: "tap", columnIndex: 0 }, { time: 29194, type: "tap", columnIndex: 1 }, { time: 29777, type: "tap", columnIndex: 2 }, { time: 30341, type: "tap", columnIndex: 0 }, { time: 30816, type: "tap", columnIndex: 1 }, { time: 31506, type: "tap", columnIndex: 2 }, { time: 32106, type: "tap", columnIndex: 0 }, { time: 32693, type: "hold", columnIndex: 0, duration: 1057 }, { time: 33803, type: "hold", columnIndex: 1, duration: 1052 }, { time: 35102, type: "tap", columnIndex: 0 }, { time: 37350, type: "hold", columnIndex: 1, duration: 1851 }, { time: 39629, type: "hold", columnIndex: 2, duration: 2237 }, { time: 42031, type: "hold", columnIndex: 0, duration: 2178 }, { time: 44365, type: "tap", columnIndex: 0 }, { time: 44996, type: "tap", columnIndex: 0 }, { time: 45618, type: "tap", columnIndex: 0 }, { time: 46143, type: "tap", columnIndex: 0 }, { time: 46708, type: "tap", columnIndex: 0 }, { time: 47258, type: "tap", columnIndex: 0 }, { time: 47812, type: "tap", columnIndex: 0 }, { time: 48333, type: "tap", columnIndex: 0 }, { time: 48601, type: "tap", columnIndex: 0 }, { time: 48988, type: "swipe", columnIndex: 0, swipeDir: "right" }, { time: 49568, type: "swipe", columnIndex: 2, swipeDir: "up" }, { time: 50154, type: "swipe", columnIndex: 0, swipeDir: "left" }, { time: 50768, type: "swipe", columnIndex: 1, swipeDir: "down" }, { time: 51337, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 51939, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 52497, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 53086, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 53638, type: "tap", columnIndex: 2 }, { time: 54286, type: "tap", columnIndex: 1 }, { time: 54830, type: "tap", columnIndex: 2 }, { time: 55440, type: "tap", columnIndex: 1 }, { time: 55971, type: "tap", columnIndex: 2 }, { time: 56523, type: "tap", columnIndex: 0 }, { time: 57124, type: "tap", columnIndex: 1 }, { time: 57742, type: "tap", columnIndex: 2 }, { time: 58339, type: "tap", columnIndex: 0 }, { time: 59372, type: "hold", columnIndex: 0, duration: 1269 }, { time: 60694, type: "hold", columnIndex: 1, duration: 2119 }, { time: 62848, type: "hold", columnIndex: 2, duration: 2364 }, { time: 65253, type: "hold", columnIndex: 0, duration: 2294 }, { time: 67709, type: "tap", columnIndex: 0 }, { time: 68257, type: "tap", columnIndex: 0 }, { time: 68812, type: "tap", columnIndex: 0 }, { time: 69407, type: "tap", columnIndex: 0 }, { time: 69707, type: "tap", columnIndex: 0 }, { time: 69989, type: "tap", columnIndex: 0 }, { time: 70554, type: "tap", columnIndex: 1 }, { time: 71147, type: "tap", columnIndex: 0 }, { time: 71721, type: "tap", columnIndex: 1 }, { time: 72304, type: "swipe", columnIndex: 0, swipeDir: "left" }, { time: 72909, type: "swipe", columnIndex: 1, swipeDir: "down" }, { time: 73509, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 74070, type: "swipe", columnIndex: 1, swipeDir: "right" }, { time: 74655, type: "tap", columnIndex: 0 }, { time: 75270, type: "swipe", columnIndex: 0, swipeDir: "left" }, { time: 75835, type: "tap", columnIndex: 0 }, { time: 76391, type: "swipe", columnIndex: 0, swipeDir: "down" }, { time: 76968, type: "tap", columnIndex: 0 }, { time: 77527, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 78153, type: "tap", columnIndex: 1 }, { time: 78701, type: "swipe", columnIndex: 1, swipeDir: "right" }, { time: 79300, type: "tap", columnIndex: 2 }, { time: 79856, type: "swipe", columnIndex: 1, swipeDir: "down" }, { time: 80433, type: "tap", columnIndex: 2 }, { time: 81041, type: "tap", columnIndex: 1 }, { time: 81632, type: "tap", columnIndex: 2 }, { time: 82232, type: "tap", columnIndex: 1 }, { time: 82769, type: "tap", columnIndex: 2 }, { time: 83391, type: "tap", columnIndex: 2 }, { time: 83960, type: "tap", columnIndex: 1 }, { time: 84554, type: "tap", columnIndex: 2 }, { time: 85139, type: "tap", columnIndex: 0 }, { time: 85715, type: "tap", columnIndex: 1 }, { time: 86261, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 86858, type: "swipe", columnIndex: 0, swipeDir: "up" }, { time: 87427, type: "swipe", columnIndex: 1, swipeDir: "right" }, { time: 88060, type: "swipe", columnIndex: 1, swipeDir: "right" }, { time: 88630, type: "tap", columnIndex: 1 }, { time: 89198, type: "swipe", columnIndex: 1, swipeDir: "down" }, { time: 89777, type: "tap", columnIndex: 1 }, { time: 90334, type: "swipe", columnIndex: 2, swipeDir: "up" }, { time: 90976, type: "tap", columnIndex: 2 }, { time: 91533, type: "swipe", columnIndex: 2, swipeDir: "left" }, { time: 92125, type: "tap", columnIndex: 2 }, { time: 92691, type: "swipe", columnIndex: 2, swipeDir: "right" }, { time: 93264, type: "tap", columnIndex: 0 }, { time: 93848, type: "swipe", columnIndex: 0, swipeDir: "down" }, { time: 94458, type: "tap", columnIndex: 1 }, { time: 95026, type: "swipe", columnIndex: 1, swipeDir: "up" }, { time: 95599, type: "tap", columnIndex: 2 }, { time: 96194, type: "tap", columnIndex: 1 }, { time: 96765, type: "tap", columnIndex: 0 }, { time: 97338, type: "tap", columnIndex: 1 }, { time: 97640, type: "tap", columnIndex: 2 }, { time: 97979, type: "tap", columnIndex: 0 }] }, "BitbotBossTrack": { musicAsset: "Bitbot", bossAssetKey: 'Boss5', config: { playerMaxHP: 10, bossMaxHP: 230 }, rawRhythmMap: [{ time: 10000, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 11181, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 12370, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 13494, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 14638, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 15817, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 16906, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 18044, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 19292, type: 'tap', columnIndex: 2 }, { time: 19848, type: 'tap', columnIndex: 1 }, { time: 20433, type: 'tap', columnIndex: 0 }, { time: 21001, type: 'tap', columnIndex: 0 }, { time: 21550, type: 'tap', columnIndex: 1 }, { time: 22137, type: 'tap', columnIndex: 2 }, { time: 22708, type: 'tap', columnIndex: 2 }, { time: 23292, type: 'tap', columnIndex: 1 }, { time: 23860, type: 'tap', columnIndex: 0 }, { time: 24446, type: 'tap', columnIndex: 1 }, { time: 25005, type: 'tap', columnIndex: 0 }, { time: 25534, type: 'tap', columnIndex: 1 }, { time: 26161, type: 'tap', columnIndex: 2 }, { time: 26689, type: 'tap', columnIndex: 1 }, { time: 27296, type: 'tap', columnIndex: 2 }, { time: 27829, type: 'tap', columnIndex: 1 }, { time: 28457, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 29038, type: 'tap', columnIndex: 1 }, { time: 29620, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 30184, type: 'tap', columnIndex: 0 }, { time: 30745, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 31335, type: 'tap', columnIndex: 2 }, { time: 31912, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 32528, type: 'tap', columnIndex: 1 }, { time: 33076, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 33635, type: 'tap', columnIndex: 2 }, { time: 34220, type: 'tap', columnIndex: 1 }, { time: 34826, type: 'tap', columnIndex: 0 }, { time: 35411, type: 'tap', columnIndex: 1 }, { time: 35931, type: 'tap', columnIndex: 2 }, { time: 36540, type: 'tap', columnIndex: 0 }, { time: 40033, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 40596, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 41156, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 41731, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 42298, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 42866, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 43444, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 44073, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 44612, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 45205, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 45759, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 46334, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 46912, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 47477, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 48006, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 48591, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 49166, type: 'hold', columnIndex: 0, duration: 899 }, { time: 50313, type: 'hold', columnIndex: 1, duration: 787 }, { time: 51269, type: 'hold', columnIndex: 2, duration: 1095 }, { time: 52758, type: 'tap', columnIndex: 2 }, { time: 53259, type: 'tap', columnIndex: 1 }, { time: 53849, type: 'tap', columnIndex: 0 }, { time: 54914, type: 'tap', columnIndex: 0 }, { time: 55453, type: 'tap', columnIndex: 1 }, { time: 56041, type: 'tap', columnIndex: 2 }, { time: 56663, type: 'tap', columnIndex: 0 }, { time: 57235, type: 'tap', columnIndex: 1 }, { time: 57842, type: 'tap', columnIndex: 2 }, { time: 58395, type: 'tap', columnIndex: 2 }, { time: 58936, type: 'tap', columnIndex: 1 }, { time: 59470, type: 'tap', columnIndex: 0 }, { time: 60030, type: 'tap', columnIndex: 0 }, { time: 60523, type: 'tap', columnIndex: 1 }, { time: 61220, type: 'tap', columnIndex: 2 }, { time: 61942, type: 'tap', columnIndex: 1 }, { time: 62510, type: 'tap', columnIndex: 0 }, { time: 65413, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 65981, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 66522, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 67167, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 67689, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 68312, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 68782, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 69415, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 69919, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 70565, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 71124, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 71702, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 72278, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 72864, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 73416, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 74034, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 74587, type: 'tap', columnIndex: 2 }, { time: 75287, type: 'tap', columnIndex: 1 }, { time: 77087, type: 'tap', columnIndex: 0 }, { time: 78073, type: 'tap', columnIndex: 1 }, { time: 78689, type: 'tap', columnIndex: 1 }, { time: 79248, type: 'tap', columnIndex: 2 }, { time: 79853, type: 'tap', columnIndex: 2 }, { time: 80403, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 80959, type: 'tap', columnIndex: 2 }, { time: 81507, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 82128, type: 'tap', columnIndex: 1 }, { time: 82706, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 83270, type: 'tap', columnIndex: 0 }, { time: 83809, type: 'tap', columnIndex: 1 }, { time: 84348, type: 'tap', columnIndex: 2 }, { time: 84771, type: 'tap', columnIndex: 1 }, { time: 85020, type: 'tap', columnIndex: 1 }, { time: 85559, type: 'tap', columnIndex: 1 }, { time: 86178, type: 'tap', columnIndex: 0 }, { time: 86733, type: 'tap', columnIndex: 1 }, { time: 87282, type: 'tap', columnIndex: 2 }, { time: 87847, type: 'tap', columnIndex: 1 }, { time: 88464, type: 'tap', columnIndex: 0 }, { time: 89023, type: 'tap', columnIndex: 1 }, { time: 89536, type: 'tap', columnIndex: 2 }, { time: 90156, type: 'tap', columnIndex: 0 }, { time: 90761, type: 'tap', columnIndex: 2 }, { time: 91315, type: 'tap', columnIndex: 1 }, { time: 91832, type: 'tap', columnIndex: 0 }, { time: 92335, type: 'tap', columnIndex: 1 }, { time: 93053, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 93640, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 94219, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 95384, type: 'hold', columnIndex: 0, duration: 878 }, { time: 96599, type: 'hold', columnIndex: 1, duration: 710 }, { time: 97525, type: 'hold', columnIndex: 2, duration: 936 }, { time: 98807, type: 'tap', columnIndex: 0 }, { time: 99181, type: 'tap', columnIndex: 1 }, { time: 99381, type: 'tap', columnIndex: 1 }, { time: 99729, type: 'tap', columnIndex: 2 }, { time: 100050, type: 'tap', columnIndex: 1 }, { time: 100645, type: 'tap', columnIndex: 0 }, { time: 101195, type: 'tap', columnIndex: 1 }, { time: 101771, type: 'tap', columnIndex: 2 }, { time: 102337, type: 'tap', columnIndex: 1 }, { time: 102867, type: 'tap', columnIndex: 2 }, { time: 103433, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 104068, type: 'tap', columnIndex: 2 }, { time: 104601, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 105198, type: 'tap', columnIndex: 1 }, { time: 105702, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 106313, type: 'tap', columnIndex: 0 }, { time: 106843, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 107447, type: 'tap', columnIndex: 1 }, { time: 107960, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 108594, type: 'tap', columnIndex: 2 }, { time: 109209, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 109748, type: 'tap', columnIndex: 0 }, { time: 110092, type: 'tap', columnIndex: 1 }, { time: 110274, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 110669, type: 'tap', columnIndex: 2 }, { time: 111013, type: 'tap', columnIndex: 1 }, { time: 111589, type: 'tap', columnIndex: 0 }, { time: 112167, type: 'tap', columnIndex: 0 }] }, "OctobeatBossTrack": { musicAsset: "Octobeat", bossAssetKey: 'boss4', // PAMIĘTAJ, ŻEBY ZMIENIĆ NA WŁAŚCIWY ASSET! config: { playerMaxHP: 10, bossMaxHP: 300 }, rawRhythmMap: [{ time: 9000, type: 'tap', columnIndex: 0 }, { time: 9434, type: 'tap', columnIndex: 0 }, { time: 9912, type: 'tap', columnIndex: 0 }, { time: 10377, type: 'tap', columnIndex: 0 }, { time: 10832, type: 'tap', columnIndex: 0 }, { time: 11318, type: 'tap', columnIndex: 0 }, { time: 11768, type: 'tap', columnIndex: 0 }, { time: 12226, type: 'tap', columnIndex: 0 }, { time: 12675, type: 'tap', columnIndex: 1 }, { time: 13160, type: 'tap', columnIndex: 1 }, { time: 13623, type: 'tap', columnIndex: 1 }, { time: 14070, type: 'tap', columnIndex: 1 }, { time: 14546, type: 'tap', columnIndex: 1 }, { time: 14976, type: 'tap', columnIndex: 1 }, { time: 15431, type: 'tap', columnIndex: 1 }, { time: 15943, type: 'tap', columnIndex: 1 }, { time: 16370, type: 'tap', columnIndex: 2 }, { time: 16836, type: 'tap', columnIndex: 2 }, { time: 17300, type: 'tap', columnIndex: 2 }, { time: 17796, type: 'tap', columnIndex: 2 }, { time: 18257, type: 'tap', columnIndex: 2 }, { time: 18652, type: 'tap', columnIndex: 2 }, { time: 19147, type: 'tap', columnIndex: 2 }, { time: 19610, type: 'tap', columnIndex: 2 }, { time: 20021, type: 'hold', columnIndex: 1, duration: 1676 }, { time: 23805, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 24245, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 24753, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 25164, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 25644, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 26127, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 26553, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 27051, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 27508, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 27910, type: 'tap', columnIndex: 2 }, { time: 28397, type: 'tap', columnIndex: 1 }, { time: 28881, type: 'tap', columnIndex: 2 }, { time: 29323, type: 'tap', columnIndex: 0 }, { time: 29798, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 30276, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 30713, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 31180, type: 'tap', columnIndex: 2 }, { time: 31676, type: 'tap', columnIndex: 2 }, { time: 32119, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 32610, type: 'tap', columnIndex: 2 }, { time: 33034, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 33500, type: 'tap', columnIndex: 1 }, { time: 33959, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 34411, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 34862, type: 'tap', columnIndex: 2 }, { time: 35370, type: 'tap', columnIndex: 2 }, { time: 35794, type: 'tap', columnIndex: 1 }, { time: 36240, type: 'tap', columnIndex: 0 }, { time: 36685, type: 'tap', columnIndex: 1 }, { time: 37197, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 38586, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 38998, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 39471, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 39912, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 40365, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 40821, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 41281, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 41721, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 42183, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 42690, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 43132, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 43616, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 44079, type: 'tap', columnIndex: 2 }, { time: 44564, type: 'tap', columnIndex: 0 }, { time: 44987, type: 'tap', columnIndex: 2 }, { time: 45462, type: 'tap', columnIndex: 1 }, { time: 45923, type: 'tap', columnIndex: 2 }, { time: 46376, type: 'tap', columnIndex: 1 }, { time: 46849, type: 'tap', columnIndex: 0 }, { time: 47298, type: 'tap', columnIndex: 1 }, { time: 47779, type: 'tap', columnIndex: 2 }, { time: 48229, type: 'tap', columnIndex: 2 }, { time: 48629, type: 'tap', columnIndex: 1 }, { time: 49136, type: 'tap', columnIndex: 2 }, { time: 49592, type: 'tap', columnIndex: 1 }, { time: 50058, type: 'tap', columnIndex: 0 }, { time: 50553, type: 'tap', columnIndex: 1 }, { time: 50971, type: 'tap', columnIndex: 2 }, { time: 51452, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 51921, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 52377, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 52847, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 53244, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 54721, type: 'tap', columnIndex: 0 }, { time: 55691, type: 'tap', columnIndex: 1 }, { time: 56574, type: 'tap', columnIndex: 2 }, { time: 57455, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 58360, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 59294, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 60217, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 61135, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 61625, type: 'tap', columnIndex: 2 }, { time: 62111, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 62557, type: 'tap', columnIndex: 2 }, { time: 63044, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 63516, type: 'tap', columnIndex: 1 }, { time: 63956, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 64435, type: 'tap', columnIndex: 0 }, { time: 64876, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 65333, type: 'tap', columnIndex: 0 }, { time: 65776, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 66252, type: 'tap', columnIndex: 1 }, { time: 66694, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 67137, type: 'tap', columnIndex: 1 }, { time: 67573, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 68048, type: 'tap', columnIndex: 2 }, { time: 71819, type: 'tap', columnIndex: 0 }, { time: 72254, type: 'tap', columnIndex: 0 }, { time: 72693, type: 'tap', columnIndex: 1 }, { time: 73175, type: 'tap', columnIndex: 1 }, { time: 73668, type: 'tap', columnIndex: 2 }, { time: 74102, type: 'tap', columnIndex: 2 }, { time: 74533, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 75030, type: 'tap', columnIndex: 2 }, { time: 75486, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 75942, type: 'tap', columnIndex: 1 }, { time: 76406, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 76888, type: 'tap', columnIndex: 0 }, { time: 77302, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 77737, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 78202, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 78674, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 79173, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 79647, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 80116, type: 'tap', columnIndex: 2 }, { time: 80586, type: 'tap', columnIndex: 1 }, { time: 81056, type: 'tap', columnIndex: 2 }, { time: 81505, type: 'tap', columnIndex: 1 }, { time: 81966, type: 'tap', columnIndex: 2 }, { time: 82413, type: 'tap', columnIndex: 0 }, { time: 82865, type: 'tap', columnIndex: 1 }, { time: 83282, type: 'tap', columnIndex: 2 }, { time: 83781, type: 'tap', columnIndex: 1 }, { time: 84260, type: 'tap', columnIndex: 0 }, { time: 84721, type: 'tap', columnIndex: 1 }, { time: 86554, type: 'tap', columnIndex: 2 }, { time: 86977, type: 'tap', columnIndex: 2 }, { time: 87417, type: 'tap', columnIndex: 1 }, { time: 87875, type: 'tap', columnIndex: 1 }, { time: 88331, type: 'tap', columnIndex: 2 }, { time: 88819, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 89262, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 89739, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 90234, type: 'tap', columnIndex: 0 }, { time: 90707, type: 'tap', columnIndex: 0 }, { time: 91146, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 91569, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 92056, type: 'tap', columnIndex: 0 }, { time: 92533, type: 'tap', columnIndex: 0 }, { time: 92973, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 93469, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 93940, type: 'tap', columnIndex: 1 }, { time: 94440, type: 'tap', columnIndex: 2 }, { time: 94873, type: 'tap', columnIndex: 1 }, { time: 95352, type: 'tap', columnIndex: 2 }, { time: 95790, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 96257, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 96722, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 97187, type: 'tap', columnIndex: 1 }, { time: 97630, type: 'tap', columnIndex: 2 }, { time: 98141, type: 'tap', columnIndex: 0 }, { time: 98544, type: 'tap', columnIndex: 1 }, { time: 99017, type: 'tap', columnIndex: 2 }, { time: 99517, type: 'tap', columnIndex: 1 }, { time: 99954, type: 'tap', columnIndex: 2 }, { time: 100405, type: 'tap', columnIndex: 1 }, { time: 100858, type: 'tap', columnIndex: 1 }, { time: 101297, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 101757, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 102188, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 102713, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 103194, type: 'tap', columnIndex: 1 }, { time: 103683, type: 'tap', columnIndex: 1 }, { time: 104091, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 104566, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 105046, type: 'tap', columnIndex: 0 }, { time: 105519, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 106020, type: 'tap', columnIndex: 1 }, { time: 106422, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 106844, type: 'tap', columnIndex: 2 }, { time: 107264, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 107787, type: 'tap', columnIndex: 2 }, { time: 108242, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 108725, type: 'tap', columnIndex: 1 }, { time: 109610, type: 'tap', columnIndex: 2 }, { time: 110364, type: 'tap', columnIndex: 0 }, { time: 112347, type: 'tap', columnIndex: 2 }, { time: 113209, type: 'tap', columnIndex: 1 }, { time: 114038, type: 'tap', columnIndex: 0 }] }, "SalabassTrack": { musicAsset: "Salabass", bossAssetKey: 'Boss6', config: { playerMaxHP: 10, bossMaxHP: 200 }, rawRhythmMap: [{ time: 9000, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 10142, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 11326, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 13571, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 14659, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 15773, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 18616, type: 'tap', columnIndex: 0 }, { time: 19183, type: 'tap', columnIndex: 2 }, { time: 19761, type: 'tap', columnIndex: 0 }, { time: 20361, type: 'tap', columnIndex: 2 }, { time: 20876, type: 'tap', columnIndex: 0 }, { time: 21409, type: 'tap', columnIndex: 1 }, { time: 21986, type: 'tap', columnIndex: 0 }, { time: 22530, type: 'tap', columnIndex: 1 }, { time: 23025, type: 'tap', columnIndex: 2 }, { time: 23651, type: 'tap', columnIndex: 1 }, { time: 24223, type: 'tap', columnIndex: 0 }, { time: 24701, type: 'tap', columnIndex: 1 }, { time: 25237, type: 'tap', columnIndex: 2 }, { time: 25848, type: 'tap', columnIndex: 1 }, { time: 26404, type: 'tap', columnIndex: 2 }, { time: 26988, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 27566, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 28152, type: 'tap', columnIndex: 0 }, { time: 28715, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 29266, type: 'tap', columnIndex: 0 }, { time: 29860, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 30418, type: 'tap', columnIndex: 1 }, { time: 30839, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 31248, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 31485, type: 'tap', columnIndex: 1 }, { time: 32013, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 32618, type: 'tap', columnIndex: 2 }, { time: 33107, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 33480, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 33804, type: 'tap', columnIndex: 2 }, { time: 34308, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 34876, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 35385, type: 'tap', columnIndex: 1 }, { time: 35964, type: 'tap', columnIndex: 2 }, { time: 36558, type: 'tap', columnIndex: 0 }, { time: 37054, type: 'tap', columnIndex: 1 }, { time: 38213, type: 'tap', columnIndex: 0 }, { time: 38714, type: 'tap', columnIndex: 0 }, { time: 39362, type: 'tap', columnIndex: 1 }, { time: 39934, type: 'tap', columnIndex: 1 }, { time: 40472, type: 'tap', columnIndex: 2 }, { time: 41082, type: 'tap', columnIndex: 2 }, { time: 41629, type: 'tap', columnIndex: 2 }, { time: 42170, type: 'tap', columnIndex: 1 }, { time: 42700, type: 'tap', columnIndex: 1 }, { time: 43241, type: 'tap', columnIndex: 0 }, { time: 43818, type: 'tap', columnIndex: 1 }, { time: 47157, type: 'tap', columnIndex: 0 }, { time: 47453, type: 'tap', columnIndex: 1 }, { time: 47708, type: 'tap', columnIndex: 2 }, { time: 47966, type: 'tap', columnIndex: 1 }, { time: 48237, type: 'tap', columnIndex: 0 }, { time: 48804, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 49308, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 49613, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 49907, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 50241, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 50505, type: 'tap', columnIndex: 2 }, { time: 51035, type: 'tap', columnIndex: 1 }, { time: 51595, type: 'tap', columnIndex: 0 }, { time: 51999, type: 'tap', columnIndex: 1 }, { time: 52278, type: 'tap', columnIndex: 2 }, { time: 52537, type: 'tap', columnIndex: 1 }, { time: 52804, type: 'tap', columnIndex: 0 }, { time: 53284, type: 'tap', columnIndex: 1 }, { time: 53819, type: 'tap', columnIndex: 2 }, { time: 54231, type: 'tap', columnIndex: 1 }, { time: 54548, type: 'tap', columnIndex: 1 }, { time: 55022, type: 'tap', columnIndex: 0 }, { time: 55514, type: 'tap', columnIndex: 1 }, { time: 56143, type: 'tap', columnIndex: 2 }, { time: 56700, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 57297, type: 'tap', columnIndex: 2 }, { time: 57799, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 58392, type: 'tap', columnIndex: 1 }, { time: 58887, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 59548, type: 'tap', columnIndex: 1 }, { time: 60053, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 60627, type: 'tap', columnIndex: 0 }, { time: 61138, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 61757, type: 'tap', columnIndex: 0 }, { time: 62317, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 62865, type: 'tap', columnIndex: 0 }, { time: 63398, type: 'tap', columnIndex: 1 }, { time: 63983, type: 'tap', columnIndex: 2 }, { time: 64530, type: 'tap', columnIndex: 0 }, { time: 64892, type: 'tap', columnIndex: 1 }, { time: 65280, type: 'tap', columnIndex: 2 }, { time: 66784, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 67366, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 67886, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 69025, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 69566, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 69851, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 71288, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 71860, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 73053, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 73566, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 74169, type: 'tap', columnIndex: 0 }, { time: 74681, type: 'tap', columnIndex: 2 }, { time: 75247, type: 'tap', columnIndex: 0 }, { time: 75792, type: 'tap', columnIndex: 1 }, { time: 76321, type: 'tap', columnIndex: 0 }, { time: 76891, type: 'tap', columnIndex: 2 }, { time: 77430, type: 'tap', columnIndex: 0 }, { time: 77987, type: 'tap', columnIndex: 1 }, { time: 78582, type: 'tap', columnIndex: 0 }, { time: 79126, type: 'tap', columnIndex: 2 }, { time: 79684, type: 'tap', columnIndex: 0 }, { time: 80230, type: 'tap', columnIndex: 1 }, { time: 80806, type: 'tap', columnIndex: 2 }, { time: 81389, type: 'tap', columnIndex: 1 }, { time: 81641, type: 'tap', columnIndex: 0 }, { time: 81986, type: 'tap', columnIndex: 1 }, { time: 82231, type: 'tap', columnIndex: 2 }, { time: 82540, type: 'tap', columnIndex: 1 }, { time: 83115, type: 'tap', columnIndex: 0 }, { time: 84183, type: 'tap', columnIndex: 1 }, { time: 85310, type: 'tap', columnIndex: 2 }, { time: 86400, type: 'tap', columnIndex: 2 }, { time: 87564, type: 'tap', columnIndex: 1 }, { time: 88652, type: 'tap', columnIndex: 0 }, { time: 92009, type: 'tap', columnIndex: 0 }, { time: 92310, type: 'tap', columnIndex: 1 }, { time: 92553, type: 'tap', columnIndex: 2 }, { time: 92825, type: 'tap', columnIndex: 1 }, { time: 93153, type: 'tap', columnIndex: 0 }, { time: 93667, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 93923, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 94223, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 94542, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 94840, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 95098, type: 'tap', columnIndex: 2 }, { time: 95402, type: 'tap', columnIndex: 1 }, { time: 95695, type: 'tap', columnIndex: 0 }, { time: 96010, type: 'tap', columnIndex: 1 }, { time: 96503, type: 'tap', columnIndex: 2 }, { time: 96732, type: 'tap', columnIndex: 0 }, { time: 97035, type: 'tap', columnIndex: 1 }, { time: 97392, type: 'tap', columnIndex: 2 }, { time: 97646, type: 'tap', columnIndex: 1 }, { time: 98194, type: 'tap', columnIndex: 0 }, { time: 98752, type: 'tap', columnIndex: 1 }, { time: 99308, type: 'tap', columnIndex: 2 }, { time: 99859, type: 'tap', columnIndex: 1 }, { time: 100125, type: 'tap', columnIndex: 2 }, { time: 100414, type: 'tap', columnIndex: 0 }, { time: 100718, type: 'tap', columnIndex: 1 }, { time: 101026, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 101585, type: 'tap', columnIndex: 2 }, { time: 102115, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 102713, type: 'tap', columnIndex: 1 }, { time: 103242, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 103572, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 103856, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 104431, type: 'tap', columnIndex: 0 }, { time: 104693, type: 'tap', columnIndex: 1 }, { time: 104948, type: 'tap', columnIndex: 2 }, { time: 105501, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 106045, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 106594, type: 'tap', columnIndex: 1 }, { time: 106849, type: 'tap', columnIndex: 2 }, { time: 107170, type: 'tap', columnIndex: 0 }, { time: 107455, type: 'tap', columnIndex: 1 }, { time: 108048, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 108343, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 108613, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 108891, type: 'tap', columnIndex: 1 }, { time: 109114, type: 'tap', columnIndex: 2 }, { time: 109397, type: 'tap', columnIndex: 1 }, { time: 109684, type: 'tap', columnIndex: 0 }, { time: 110033, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 112244, type: 'tap', columnIndex: 0 }, { time: 112796, type: 'tap', columnIndex: 1 }, { time: 113314, type: 'tap', columnIndex: 2 }, { time: 113915, type: 'tap', columnIndex: 0 }, { time: 114151, type: 'tap', columnIndex: 1 }, { time: 114482, type: 'tap', columnIndex: 2 }, { time: 115018, type: 'tap', columnIndex: 2 }, { time: 115555, type: 'tap', columnIndex: 1 }, { time: 116005, type: 'tap', columnIndex: 0 }, { time: 116286, type: 'tap', columnIndex: 0 }, { time: 116714, type: 'tap', columnIndex: 1 }, { time: 116994, type: 'tap', columnIndex: 2 }, { time: 117267, type: 'tap', columnIndex: 1 }, { time: 117755, type: 'tap', columnIndex: 0 }, { time: 118088, type: 'tap', columnIndex: 0 }, { time: 118368, type: 'tap', columnIndex: 1 }, { time: 118643, type: 'tap', columnIndex: 2 }, { time: 118912, type: 'tap', columnIndex: 1 }, { time: 119521, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 120045, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 120611, type: 'tap', columnIndex: 1 }, { time: 121185, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 121665, type: 'tap', columnIndex: 1 }, { time: 122286, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 122870, type: 'tap', columnIndex: 1 }, { time: 123380, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 124009, type: 'tap', columnIndex: 1 }, { time: 124501, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 125119, type: 'tap', columnIndex: 1 }, { time: 125654, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 126167, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 126771, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 127235, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 127846, type: 'swipe', columnIndex: 2, swipeDir: 'left' }] }, "Funkilla_Track": { musicAsset: 'Funkilla', bossAssetKey: 'boss7', config: { playerMaxHP: 10, bossMaxHP: 280 }, rawRhythmMap: [{ time: 14000, type: 'tap', columnIndex: 0 }, { time: 14408, type: 'tap', columnIndex: 1 }, { time: 14662, type: 'tap', columnIndex: 2 }, { time: 15120, type: 'tap', columnIndex: 1 }, { time: 15574, type: 'tap', columnIndex: 0 }, { time: 16021, type: 'tap', columnIndex: 1 }, { time: 16400, type: 'tap', columnIndex: 2 }, { time: 17276, type: 'tap', columnIndex: 0 }, { time: 17704, type: 'tap', columnIndex: 1 }, { time: 17907, type: 'tap', columnIndex: 2 }, { time: 18314, type: 'tap', columnIndex: 1 }, { time: 18886, type: 'tap', columnIndex: 0 }, { time: 19335, type: 'tap', columnIndex: 1 }, { time: 19762, type: 'tap', columnIndex: 2 }, { time: 20589, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 20996, type: 'tap', columnIndex: 0 }, { time: 21430, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 21851, type: 'tap', columnIndex: 0 }, { time: 22272, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 22693, type: 'tap', columnIndex: 0 }, { time: 23060, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 23511, type: 'tap', columnIndex: 1 }, { time: 23915, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 24354, type: 'tap', columnIndex: 1 }, { time: 24699, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 25159, type: 'tap', columnIndex: 1 }, { time: 25560, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 25977, type: 'tap', columnIndex: 1 }, { time: 26370, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 26800, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 27216, type: 'tap', columnIndex: 2 }, { time: 27658, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 28096, type: 'tap', columnIndex: 2 }, { time: 28440, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 28914, type: 'tap', columnIndex: 2 }, { time: 29320, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 29731, type: 'tap', columnIndex: 2 }, { time: 30123, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 30545, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 30938, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 31321, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 31719, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 33405, type: 'tap', columnIndex: 0 }, { time: 33861, type: 'tap', columnIndex: 1 }, { time: 34253, type: 'tap', columnIndex: 0 }, { time: 34670, type: 'tap', columnIndex: 1 }, { time: 35056, type: 'tap', columnIndex: 2 }, { time: 35489, type: 'tap', columnIndex: 1 }, { time: 35911, type: 'tap', columnIndex: 0 }, { time: 36294, type: 'tap', columnIndex: 1 }, { time: 36736, type: 'tap', columnIndex: 0 }, { time: 37159, type: 'tap', columnIndex: 0 }, { time: 37539, type: 'tap', columnIndex: 1 }, { time: 37926, type: 'tap', columnIndex: 2 }, { time: 38374, type: 'tap', columnIndex: 2 }, { time: 38763, type: 'tap', columnIndex: 0 }, { time: 39271, type: 'tap', columnIndex: 0 }, { time: 39599, type: 'tap', columnIndex: 1 }, { time: 40057, type: 'tap', columnIndex: 2 }, { time: 40482, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 40898, type: 'tap', columnIndex: 2 }, { time: 41326, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 41728, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 42081, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 42515, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 42956, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 43332, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 43705, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 44148, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 44563, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 44964, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 45722, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 46575, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 47078, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 47414, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 47882, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 48287, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 48741, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 49120, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 49554, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 49954, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 50372, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 50818, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 51182, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 51620, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 52021, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 52460, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 52870, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 53287, type: 'tap', columnIndex: 0 }, { time: 53690, type: 'tap', columnIndex: 1 }, { time: 54088, type: 'tap', columnIndex: 2 }, { time: 54491, type: 'tap', columnIndex: 1 }, { time: 54941, type: 'tap', columnIndex: 0 }, { time: 55354, type: 'tap', columnIndex: 1 }, { time: 55743, type: 'tap', columnIndex: 2 }, { time: 56167, type: 'tap', columnIndex: 1 }, { time: 56585, type: 'tap', columnIndex: 0 }, { time: 56839, type: 'tap', columnIndex: 0 }, { time: 57036, type: 'tap', columnIndex: 0 }, { time: 57414, type: 'tap', columnIndex: 0 }, { time: 57813, type: 'tap', columnIndex: 0 }, { time: 57987, type: 'tap', columnIndex: 0 }, { time: 58443, type: 'tap', columnIndex: 0 }, { time: 58653, type: 'tap', columnIndex: 0 }, { time: 59048, type: 'tap', columnIndex: 0 }, { time: 59478, type: 'tap', columnIndex: 0 }, { time: 59901, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 60664, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 61341, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 62109, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 62735, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 63171, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 63933, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 64699, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 65547, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 66498, type: 'tap', columnIndex: 0 }, { time: 66916, type: 'tap', columnIndex: 0 }, { time: 67356, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 67724, type: 'tap', columnIndex: 0 }, { time: 68116, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 68566, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 68786, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 69317, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 69752, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 70197, type: 'tap', columnIndex: 1 }, { time: 70617, type: 'tap', columnIndex: 2 }, { time: 71029, type: 'tap', columnIndex: 1 }, { time: 71434, type: 'tap', columnIndex: 0 }, { time: 71872, type: 'tap', columnIndex: 1 }, { time: 72266, type: 'tap', columnIndex: 2 }, { time: 72726, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 72926, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 73509, type: 'tap', columnIndex: 2 }, { time: 73921, type: 'tap', columnIndex: 1 }, { time: 74386, type: 'tap', columnIndex: 0 }, { time: 74791, type: 'tap', columnIndex: 1 }, { time: 75186, type: 'tap', columnIndex: 2 }, { time: 75436, type: 'tap', columnIndex: 1 }, { time: 75921, type: 'tap', columnIndex: 0 }, { time: 76148, type: 'tap', columnIndex: 1 }, { time: 76515, type: 'tap', columnIndex: 2 }, { time: 76901, type: 'tap', columnIndex: 1 }, { time: 77296, type: 'tap', columnIndex: 0 }, { time: 77667, type: 'tap', columnIndex: 1 }, { time: 78067, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 78791, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 79710, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 80146, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 93170, type: 'tap', columnIndex: 0 }, { time: 93789, type: 'tap', columnIndex: 1 }, { time: 94644, type: 'tap', columnIndex: 2 }, { time: 95509, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 96267, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 97120, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 97981, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 98838, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 99700, type: 'tap', columnIndex: 2 }, { time: 100508, type: 'tap', columnIndex: 2 }, { time: 101316, type: 'tap', columnIndex: 2 }, { time: 102092, type: 'tap', columnIndex: 1 }, { time: 102887, type: 'tap', columnIndex: 0 }, { time: 103750, type: 'tap', columnIndex: 0 }, { time: 104539, type: 'tap', columnIndex: 1 }, { time: 105371, type: 'tap', columnIndex: 2 }, { time: 106190, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 107876, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 108765, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 109585, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 111196, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 112020, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 112817, type: 'hold', columnIndex: 0, duration: 1225 }, { time: 114439, type: 'hold', columnIndex: 1, duration: 1476 }, { time: 116176, type: 'hold', columnIndex: 0, duration: 1421 }, { time: 117777, type: 'hold', columnIndex: 1, duration: 783 }, { time: 118605, type: 'hold', columnIndex: 2, duration: 706 }, { time: 119484, type: 'tap', columnIndex: 0 }, { time: 119947, type: 'tap', columnIndex: 0 }, { time: 120328, type: 'tap', columnIndex: 0 }, { time: 120773, type: 'tap', columnIndex: 0 }, { time: 121165, type: 'tap', columnIndex: 0 }, { time: 121548, type: 'tap', columnIndex: 0 }, { time: 121952, type: 'tap', columnIndex: 0 }, { time: 122362, type: 'tap', columnIndex: 0 }, { time: 122735, type: 'tap', columnIndex: 2 }, { time: 123201, type: 'tap', columnIndex: 2 }, { time: 123612, type: 'tap', columnIndex: 2 }, { time: 124006, type: 'tap', columnIndex: 2 }, { time: 124462, type: 'tap', columnIndex: 2 }, { time: 124853, type: 'tap', columnIndex: 2 }, { time: 125279, type: 'tap', columnIndex: 2 }, { time: 125663, type: 'tap', columnIndex: 2 }, { time: 126092, type: 'tap', columnIndex: 1 }, { time: 126504, type: 'tap', columnIndex: 1 }, { time: 126917, type: 'tap', columnIndex: 1 }, { time: 127336, type: 'tap', columnIndex: 1 }, { time: 127760, type: 'tap', columnIndex: 1 }, { time: 128158, type: 'tap', columnIndex: 1 }, { time: 128556, type: 'tap', columnIndex: 1 }, { time: 129002, type: 'tap', columnIndex: 1 }, { time: 129394, type: 'tap', columnIndex: 0 }, { time: 129822, type: 'tap', columnIndex: 0 }, { time: 130235, type: 'tap', columnIndex: 1 }, { time: 130659, type: 'tap', columnIndex: 1 }, { time: 131059, type: 'tap', columnIndex: 2 }, { time: 131487, type: 'tap', columnIndex: 2 }, { time: 131907, type: 'tap', columnIndex: 2 }, { time: 132335, type: 'tap', columnIndex: 2 }, { time: 135940, type: 'tap', columnIndex: 0 }, { time: 136089, type: 'tap', columnIndex: 1 }, { time: 136436, type: 'tap', columnIndex: 1 }, { time: 136826, type: 'tap', columnIndex: 2 }, { time: 137228, type: 'tap', columnIndex: 1 }, { time: 137649, type: 'tap', columnIndex: 0 }, { time: 138072, type: 'tap', columnIndex: 1 }, { time: 138469, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 138920, type: 'swipe', columnIndex: 1, swipeDir: 'up' }, { time: 139330, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 139777, type: 'tap', columnIndex: 0 }, { time: 140146, type: 'tap', columnIndex: 1 }, { time: 140568, type: 'tap', columnIndex: 2 }, { time: 140989, type: 'tap', columnIndex: 1 }, { time: 141345, type: 'tap', columnIndex: 0 }, { time: 141796, type: 'tap', columnIndex: 1 }, { time: 142211, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 142596, type: 'swipe', columnIndex: 1, swipeDir: 'down' }, { time: 143062, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 143478, type: 'tap', columnIndex: 2 }, { time: 143919, type: 'tap', columnIndex: 1 }, { time: 144312, type: 'tap', columnIndex: 0 }, { time: 144715, type: 'tap', columnIndex: 1 }, { time: 145134, type: 'tap', columnIndex: 2 }, { time: 145507, type: 'tap', columnIndex: 0 }, { time: 145915, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 146294, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 146747, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 147148, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 147576, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 148371, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 149212, type: 'tap', columnIndex: 0 }] }, "DJPepe_Track": { musicAsset: 'djpepe', bossAssetKey: 'boss_intro_graphic_boss8', config: { playerMaxHP: 10, bossMaxHP: 350 }, rawRhythmMap: [{ time: 10000, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 10531, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 11059, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 11497, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 11969, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 12429, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 12850, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 13294, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 13794, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 14227, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 14663, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 15126, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 15592, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 16040, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 16467, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 16906, type: 'tap', columnIndex: 2 }, { time: 17809, type: 'tap', columnIndex: 1 }, { time: 18673, type: 'tap', columnIndex: 0 }, { time: 19593, type: 'tap', columnIndex: 2 }, { time: 20561, type: 'tap', columnIndex: 1 }, { time: 21448, type: 'tap', columnIndex: 0 }, { time: 22307, type: 'tap', columnIndex: 0 }, { time: 23234, type: 'tap', columnIndex: 1 }, { time: 24128, type: 'tap', columnIndex: 0 }, { time: 24593, type: 'tap', columnIndex: 1 }, { time: 25055, type: 'tap', columnIndex: 0 }, { time: 25503, type: 'tap', columnIndex: 1 }, { time: 25963, type: 'tap', columnIndex: 2 }, { time: 26396, type: 'tap', columnIndex: 1 }, { time: 26848, type: 'tap', columnIndex: 2 }, { time: 27298, type: 'tap', columnIndex: 1 }, { time: 27761, type: 'tap', columnIndex: 0 }, { time: 28220, type: 'tap', columnIndex: 1 }, { time: 28651, type: 'tap', columnIndex: 0 }, { time: 29141, type: 'tap', columnIndex: 1 }, { time: 29558, type: 'tap', columnIndex: 0 }, { time: 30008, type: 'tap', columnIndex: 2 }, { time: 30443, type: 'tap', columnIndex: 0 }, { time: 30927, type: 'tap', columnIndex: 2 }, { time: 31352, type: 'tap', columnIndex: 0 }, { time: 31761, type: 'tap', columnIndex: 1 }, { time: 32220, type: 'tap', columnIndex: 0 }, { time: 32464, type: 'tap', columnIndex: 1 }, { time: 32685, type: 'tap', columnIndex: 0 }, { time: 33127, type: 'tap', columnIndex: 1 }, { time: 33354, type: 'tap', columnIndex: 0 }, { time: 33594, type: 'tap', columnIndex: 1 }, { time: 34052, type: 'tap', columnIndex: 0 }, { time: 34258, type: 'tap', columnIndex: 1 }, { time: 34474, type: 'tap', columnIndex: 0 }, { time: 34959, type: 'tap', columnIndex: 0 }, { time: 35166, type: 'tap', columnIndex: 1 }, { time: 35381, type: 'tap', columnIndex: 0 }, { time: 35791, type: 'tap', columnIndex: 0 }, { time: 36050, type: 'tap', columnIndex: 1 }, { time: 36284, type: 'tap', columnIndex: 0 }, { time: 36766, type: 'tap', columnIndex: 1 }, { time: 37191, type: 'tap', columnIndex: 2 }, { time: 37644, type: 'tap', columnIndex: 1 }, { time: 37872, type: 'tap', columnIndex: 0 }, { time: 38115, type: 'tap', columnIndex: 1 }, { time: 38547, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 39020, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 39484, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 39919, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 40359, type: 'tap', columnIndex: 0 }, { time: 40825, type: 'tap', columnIndex: 1 }, { time: 41282, type: 'tap', columnIndex: 2 }, { time: 41717, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 42166, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 42613, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 43066, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 43486, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 43960, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 44431, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 44914, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 45363, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 45777, type: 'tap', columnIndex: 1 }, { time: 46014, type: 'tap', columnIndex: 2 }, { time: 46484, type: 'tap', columnIndex: 1 }, { time: 46687, type: 'tap', columnIndex: 0 }, { time: 47171, type: 'tap', columnIndex: 0 }, { time: 47639, type: 'tap', columnIndex: 1 }, { time: 47991, type: 'tap', columnIndex: 2 }, { time: 48499, type: 'tap', columnIndex: 1 }, { time: 48939, type: 'tap', columnIndex: 0 }, { time: 49380, type: 'tap', columnIndex: 0 }, { time: 49836, type: 'tap', columnIndex: 1 }, { time: 50274, type: 'tap', columnIndex: 0 }, { time: 50753, type: 'tap', columnIndex: 1 }, { time: 51188, type: 'tap', columnIndex: 2 }, { time: 53018, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 53464, type: 'tap', columnIndex: 0 }, { time: 53888, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 54321, type: 'tap', columnIndex: 0 }, { time: 54764, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 55229, type: 'tap', columnIndex: 0 }, { time: 55679, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 56144, type: 'tap', columnIndex: 0 }, { time: 56574, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 57046, type: 'tap', columnIndex: 0 }, { time: 57491, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 57930, type: 'tap', columnIndex: 0 }, { time: 58432, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 58860, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 59309, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 59761, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 60227, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 60661, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 61140, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 61545, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 62017, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 62446, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 62917, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 63358, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 63830, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 64273, type: 'swipe', columnIndex: 0, swipeDir: 'up' }, { time: 64721, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 65194, type: 'swipe', columnIndex: 2, swipeDir: 'down' }, { time: 65617, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 66078, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 66517, type: 'tap', columnIndex: 0 }, { time: 66980, type: 'tap', columnIndex: 0 }, { time: 67424, type: 'tap', columnIndex: 1 }, { time: 70562, type: 'tap', columnIndex: 2 }, { time: 71501, type: 'tap', columnIndex: 0 }, { time: 72424, type: 'tap', columnIndex: 2 }, { time: 73366, type: 'tap', columnIndex: 0 }, { time: 74192, type: 'tap', columnIndex: 2 }, { time: 75140, type: 'tap', columnIndex: 0 }, { time: 76031, type: 'tap', columnIndex: 2 }, { time: 76925, type: 'tap', columnIndex: 0 }, { time: 77822, type: 'tap', columnIndex: 2 }, { time: 78756, type: 'tap', columnIndex: 0 }, { time: 79614, type: 'tap', columnIndex: 2 }, { time: 80521, type: 'tap', columnIndex: 0 }, { time: 81401, type: 'tap', columnIndex: 2 }, { time: 83665, type: 'tap', columnIndex: 1 }, { time: 84095, type: 'tap', columnIndex: 2 }, { time: 84600, type: 'tap', columnIndex: 1 }, { time: 85081, type: 'tap', columnIndex: 2 }, { time: 85556, type: 'tap', columnIndex: 0 }, { time: 85989, type: 'tap', columnIndex: 1 }, { time: 86498, type: 'tap', columnIndex: 2 }, { time: 86875, type: 'tap', columnIndex: 1 }, { time: 87325, type: 'tap', columnIndex: 0 }, { time: 87731, type: 'tap', columnIndex: 2 }, { time: 88197, type: 'tap', columnIndex: 0 }, { time: 88671, type: 'tap', columnIndex: 1 }, { time: 89061, type: 'tap', columnIndex: 2 }, { time: 89490, type: 'tap', columnIndex: 1 }, { time: 89942, type: 'tap', columnIndex: 0 }, { time: 90367, type: 'tap', columnIndex: 1 }, { time: 90875, type: 'tap', columnIndex: 2 }, { time: 91342, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 97934, type: 'tap', columnIndex: 1 }, { time: 98115, type: 'tap', columnIndex: 2 }, { time: 98625, type: 'tap', columnIndex: 1 }, { time: 98847, type: 'tap', columnIndex: 2 }, { time: 99511, type: 'tap', columnIndex: 0 }, { time: 99935, type: 'tap', columnIndex: 1 }, { time: 100356, type: 'tap', columnIndex: 2 }, { time: 100827, type: 'tap', columnIndex: 1 }, { time: 101268, type: 'tap', columnIndex: 0 }, { time: 101708, type: 'tap', columnIndex: 1 }, { time: 102162, type: 'tap', columnIndex: 2 }, { time: 102599, type: 'tap', columnIndex: 1 }, { time: 103072, type: 'tap', columnIndex: 2 }, { time: 103531, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 103994, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 104466, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 104880, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 105304, type: 'tap', columnIndex: 0 }, { time: 105530, type: 'tap', columnIndex: 1 }, { time: 106018, type: 'tap', columnIndex: 0 }, { time: 106254, type: 'tap', columnIndex: 1 }, { time: 106705, type: 'tap', columnIndex: 0 }, { time: 107132, type: 'tap', columnIndex: 1 }, { time: 107571, type: 'tap', columnIndex: 2 }, { time: 108044, type: 'tap', columnIndex: 1 }, { time: 108460, type: 'tap', columnIndex: 0 }, { time: 108907, type: 'tap', columnIndex: 1 }, { time: 109357, type: 'tap', columnIndex: 2 }, { time: 109842, type: 'tap', columnIndex: 1 }, { time: 110295, type: 'tap', columnIndex: 0 }, { time: 110741, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 112536, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 113006, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 113450, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 113893, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 114350, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 114796, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 115240, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 115697, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 116142, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 116599, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 117052, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 117495, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 117942, type: 'tap', columnIndex: 0 }, { time: 118393, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 118866, type: 'tap', columnIndex: 0 }, { time: 119352, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 119778, type: 'tap', columnIndex: 1 }, { time: 120229, type: 'tap', columnIndex: 2 }, { time: 120730, type: 'tap', columnIndex: 1 }, { time: 121155, type: 'tap', columnIndex: 2 }, { time: 121587, type: 'tap', columnIndex: 1 }, { time: 122018, type: 'tap', columnIndex: 0 }, { time: 122487, type: 'tap', columnIndex: 1 }, { time: 122912, type: 'tap', columnIndex: 2 }, { time: 123373, type: 'tap', columnIndex: 1 }, { time: 123855, type: 'tap', columnIndex: 0 }, { time: 124270, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 124721, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 125167, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 126969, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 127453, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 127869, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 128352, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 128783, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 129235, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 129718, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 130106, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 130578, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 131040, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 131486, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 131909, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 132332, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 132818, type: 'tap', columnIndex: 1 }, { time: 133292, type: 'tap', columnIndex: 2 }, { time: 133764, type: 'tap', columnIndex: 1 }, { time: 134221, type: 'tap', columnIndex: 0 }, { time: 134652, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 135093, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 135522, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 135965, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 136419, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 136881, type: 'swipe', columnIndex: 2, swipeDir: 'up' }, { time: 137324, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 137785, type: 'swipe', columnIndex: 0, swipeDir: 'down' }, { time: 138261, type: 'tap', columnIndex: 2 }, { time: 138713, type: 'tap', columnIndex: 1 }, { time: 139167, type: 'tap', columnIndex: 0 }, { time: 139599, type: 'tap', columnIndex: 1 }] }, "OrctaveBossTrack": { musicAsset: "Orctave", // Upewnij się, że masz asset muzyczny o tym kluczu bossAssetKey: 'Boss1_Asset', // Asset dla pierwszego bossa config: { playerMaxHP: 10, bossMaxHP: 200 }, rawRhythmMap: [{ time: 8596, type: 'tap', columnIndex: 0 }, { time: 8795, type: 'tap', columnIndex: 1 }, { time: 9117, type: 'tap', columnIndex: 2 }, { time: 9832, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 10536, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 11245, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 11888, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 12628, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 13308, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 13986, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 14696, type: 'tap', columnIndex: 2 }, { time: 15456, type: 'tap', columnIndex: 2 }, { time: 16140, type: 'tap', columnIndex: 1 }, { time: 16863, type: 'tap', columnIndex: 1 }, { time: 17547, type: 'tap', columnIndex: 0 }, { time: 18275, type: 'tap', columnIndex: 0 }, { time: 18955, type: 'tap', columnIndex: 0 }, { time: 19670, type: 'tap', columnIndex: 0 }, { time: 20333, type: 'tap', columnIndex: 1 }, { time: 20740, type: 'tap', columnIndex: 2 }, { time: 21063, type: 'tap', columnIndex: 1 }, { time: 21411, type: 'tap', columnIndex: 0 }, { time: 21742, type: 'tap', columnIndex: 1 }, { time: 22110, type: 'tap', columnIndex: 2 }, { time: 22463, type: 'tap', columnIndex: 1 }, { time: 22797, type: 'tap', columnIndex: 0 }, { time: 23336, type: 'tap', columnIndex: 2 }, { time: 26163, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 26737, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 27351, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 27764, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 28116, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 28827, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 29546, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 30102, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 30534, type: 'swipe', columnIndex: 1, swipeDir: 'right' }, { time: 30931, type: 'swipe', columnIndex: 0, swipeDir: 'left' }, { time: 31677, type: 'tap', columnIndex: 2 }, { time: 32392, type: 'tap', columnIndex: 1 }, { time: 32989, type: 'tap', columnIndex: 2 }, { time: 33386, type: 'tap', columnIndex: 2 }, { time: 33781, type: 'tap', columnIndex: 1 }, { time: 34568, type: 'tap', columnIndex: 2 }, { time: 35234, type: 'tap', columnIndex: 1 }, { time: 35749, type: 'tap', columnIndex: 2 }, { time: 36182, type: 'tap', columnIndex: 2 }, { time: 36583, type: 'tap', columnIndex: 0 }, { time: 37302, type: 'tap', columnIndex: 0 }, { time: 37681, type: 'tap', columnIndex: 1 }, { time: 38033, type: 'tap', columnIndex: 2 }, { time: 38354, type: 'tap', columnIndex: 2 }, { time: 38721, type: 'tap', columnIndex: 1 }, { time: 39067, type: 'tap', columnIndex: 0 }, { time: 39471, type: 'tap', columnIndex: 1 }, { time: 39821, type: 'tap', columnIndex: 2 }, { time: 40164, type: 'tap', columnIndex: 1 }, { time: 40488, type: 'tap', columnIndex: 0 }, { time: 40861, type: 'tap', columnIndex: 0 }, { time: 41250, type: 'tap', columnIndex: 1 }, { time: 41609, type: 'tap', columnIndex: 2 }, { time: 41946, type: 'tap', columnIndex: 1 }, { time: 42290, type: 'tap', columnIndex: 0 }, { time: 42643, type: 'tap', columnIndex: 2 }, { time: 43068, type: 'tap', columnIndex: 1 }, { time: 43379, type: 'tap', columnIndex: 2 }, { time: 43726, type: 'tap', columnIndex: 1 }, { time: 44078, type: 'tap', columnIndex: 2 }, { time: 44414, type: 'tap', columnIndex: 1 }, { time: 44728, type: 'tap', columnIndex: 2 }, { time: 45115, type: 'tap', columnIndex: 1 }, { time: 45475, type: 'tap', columnIndex: 2 }, { time: 45809, type: 'tap', columnIndex: 0 }, { time: 46199, type: 'tap', columnIndex: 1 }, { time: 46521, type: 'tap', columnIndex: 2 }, { time: 46855, type: 'tap', columnIndex: 1 }, { time: 47190, type: 'tap', columnIndex: 0 }, { time: 47535, type: 'tap', columnIndex: 2 }, { time: 47874, type: 'tap', columnIndex: 1 }, { time: 48252, type: 'tap', columnIndex: 2 }, { time: 51448, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 52112, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 52853, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 53536, type: 'swipe', columnIndex: 2, swipeDir: 'left' }, { time: 54251, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 54964, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 55618, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 56339, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 57058, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 57799, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 58512, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 59170, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 59911, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 60668, type: 'tap', columnIndex: 2 }, { time: 61334, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 62084, type: 'tap', columnIndex: 2 }, { time: 62744, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 63445, type: 'tap', columnIndex: 2 }, { time: 64134, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 64827, type: 'tap', columnIndex: 1 }, { time: 65532, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 66199, type: 'tap', columnIndex: 1 }, { time: 66921, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 67679, type: 'tap', columnIndex: 1 }, { time: 68353, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 69005, type: 'tap', columnIndex: 0 }, { time: 69772, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 70457, type: 'tap', columnIndex: 0 }, { time: 71178, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 71892, type: 'swipe', columnIndex: 2, swipeDir: 'right' }, { time: 72585, type: 'swipe', columnIndex: 1, swipeDir: 'left' }, { time: 73287, type: 'swipe', columnIndex: 0, swipeDir: 'right' }, { time: 74094, type: 'tap', columnIndex: 2 }, { time: 75031, type: 'tap', columnIndex: 1 }, { time: 75469, type: 'tap', columnIndex: 2 }, { time: 75831, type: 'tap', columnIndex: 2 }, { time: 76181, type: 'tap', columnIndex: 1 }, { time: 76909, type: 'tap', columnIndex: 0 }, { time: 77641, type: 'tap', columnIndex: 1 }, { time: 78208, type: 'tap', columnIndex: 2 }, { time: 78675, type: 'tap', columnIndex: 2 }, { time: 79001, type: 'tap', columnIndex: 1 }, { time: 79743, type: 'tap', columnIndex: 0 }, { time: 80401, type: 'tap', columnIndex: 1 }, { time: 80982, type: 'tap', columnIndex: 0 }, { time: 81387, type: 'tap', columnIndex: 0 }, { time: 81769, type: 'tap', columnIndex: 1 }, { time: 82537, type: 'tap', columnIndex: 2 }, { time: 83216, type: 'tap', columnIndex: 1 }, { time: 83789, type: 'tap', columnIndex: 0 }, { time: 84229, type: 'tap', columnIndex: 0 }, { time: 84566, type: 'tap', columnIndex: 0 }, { time: 84923, type: 'tap', columnIndex: 0 }, { time: 85105, type: 'tap', columnIndex: 0 }, { time: 85305, type: 'tap', columnIndex: 1 }] } }; // Initialize and add gameUIContainer to the game scene gameUIContainer = new Container(); game.addChild(gameUIContainer); // Function to process raw rhythm map data (remains unchanged, ensure it's here) function processRawRhythmMap(rawMapData, songKeyForLogging) { console.log("Processing raw map for: " + songKeyForLogging + " with " + rawMapData.length + " initial notes."); var processedMap = []; var tempMap = []; for (var k = 0; k < rawMapData.length; k++) { var originalNote = rawMapData[k]; var copiedNote = {}; for (var key in originalNote) { if (originalNote.hasOwnProperty(key)) { copiedNote[key] = originalNote[key]; } } tempMap.push(copiedNote); } for (var i = 0; i < tempMap.length; i++) { var note = tempMap[i]; if (note.type === 'swipe' && note.swipeDir) { var dir = note.swipeDir.toLowerCase(); if (dir.includes('right')) { note.swipeDir = 'right'; } else if (dir.includes('left')) { note.swipeDir = 'left'; } else if (dir.includes('up')) { note.swipeDir = 'up'; } else if (dir.includes('down')) { note.swipeDir = 'down'; } } } var timeGroupedNotes = {}; tempMap.forEach(function (note) { if (!timeGroupedNotes[note.time]) { timeGroupedNotes[note.time] = []; } timeGroupedNotes[note.time].push(note); }); var finalMapNotes = []; var sortedTimes = Object.keys(timeGroupedNotes).map(Number).sort(function (a, b) { return a - b; }); for (var tIdx = 0; tIdx < sortedTimes.length; tIdx++) { var time = sortedTimes[tIdx]; var notesAtThisTime = timeGroupedNotes[time]; var notesToKeepAtThisTime = []; var processedForWiderSwipeConversion = []; var colsWithVerticalSwipes = [null, null, null, null]; notesAtThisTime.forEach(function (note) { if (note.type === 'swipe' && (note.swipeDir === 'up' || note.swipeDir === 'down')) { if (note.columnIndex >= 0 && note.columnIndex < NUM_COLUMNS) { var alreadyConverted = false; for (var convIdx = 0; convIdx < processedForWiderSwipeConversion.length; convIdx++) { if (processedForWiderSwipeConversion[convIdx].originalTime === note.time && processedForWiderSwipeConversion[convIdx].originalColumn === note.columnIndex) { alreadyConverted = true; break; } } if (!alreadyConverted) { colsWithVerticalSwipes[note.columnIndex] = note.swipeDir; } } } }); for (var c = 0; c < NUM_COLUMNS - 1; c++) { if (colsWithVerticalSwipes[c] && colsWithVerticalSwipes[c + 1] && colsWithVerticalSwipes[c] === colsWithVerticalSwipes[c + 1]) { var randomHorizontalDir = Math.random() < 0.5 ? 'left' : 'right'; var pairCenterX = (columnCenterXs[c] + columnCenterXs[c + 1]) / 2; notesToKeepAtThisTime.push({ time: time, type: 'swipe', swipeDir: randomHorizontalDir, partOfWiderSwipe: 'leftHalf', widerSwipePairCenterX: pairCenterX, originalColumnHint: c }); notesToKeepAtThisTime.push({ time: time, type: 'swipe', swipeDir: randomHorizontalDir, partOfWiderSwipe: 'rightHalf', widerSwipePairCenterX: pairCenterX, originalColumnHint: c + 1 }); processedForWiderSwipeConversion.push({ originalTime: time, originalColumn: c }); processedForWiderSwipeConversion.push({ originalTime: time, originalColumn: c + 1 }); colsWithVerticalSwipes[c] = null; colsWithVerticalSwipes[c + 1] = null; c++; } } notesAtThisTime.forEach(function (note) { var wasConverted = false; for (var convIdx = 0; convIdx < processedForWiderSwipeConversion.length; convIdx++) { if (processedForWiderSwipeConversion[convIdx].originalTime === note.time && processedForWiderSwipeConversion[convIdx].originalColumn === note.columnIndex && (note.swipeDir === 'up' || note.swipeDir === 'down')) { wasConverted = true; break; } } if (!wasConverted) { notesToKeepAtThisTime.push(note); } }); var horizontalWiderSwipePairs = {}; var notesForFinalProcessing = []; var uniqueNotesAtThisTime = []; var seenNotesKeysAtThisTime = {}; notesToKeepAtThisTime.forEach(function (note) { var key = "" + note.type + "_" + (note.columnIndex !== undefined ? note.columnIndex : note.partOfWiderSwipe ? note.widerSwipePairCenterX + note.partOfWiderSwipe : '') + "_" + (note.swipeDir || ''); if (!seenNotesKeysAtThisTime[key]) { uniqueNotesAtThisTime.push(note); seenNotesKeysAtThisTime[key] = true; } }); uniqueNotesAtThisTime.sort(function (a, b) { var valA = a.originalColumnHint !== undefined ? a.originalColumnHint : a.columnIndex !== undefined ? a.columnIndex : a.widerSwipePairCenterX || 0; var valB = b.originalColumnHint !== undefined ? b.originalColumnHint : b.columnIndex !== undefined ? b.columnIndex : b.widerSwipePairCenterX || 0; return valA - valB; }); for (var nIdx = 0; nIdx < uniqueNotesAtThisTime.length; nIdx++) { var note = uniqueNotesAtThisTime[nIdx]; if (note.partOfWiderSwipe) { notesForFinalProcessing.push(note); continue; } var potentialPartner = null; if (nIdx + 1 < uniqueNotesAtThisTime.length) { potentialPartner = uniqueNotesAtThisTime[nIdx + 1]; } if (note.type === 'swipe' && (note.swipeDir === 'left' || note.swipeDir === 'right') && potentialPartner && potentialPartner.type === 'swipe' && potentialPartner.time === note.time && potentialPartner.swipeDir === note.swipeDir && potentialPartner.columnIndex === note.columnIndex + 1) { var pairCenterX = (columnCenterXs[note.columnIndex] + columnCenterXs[potentialPartner.columnIndex]) / 2; notesForFinalProcessing.push({ time: note.time, type: 'swipe', swipeDir: note.swipeDir, partOfWiderSwipe: 'leftHalf', widerSwipePairCenterX: pairCenterX, originalColumnHint: note.columnIndex }); notesForFinalProcessing.push({ time: potentialPartner.time, type: 'swipe', swipeDir: potentialPartner.swipeDir, partOfWiderSwipe: 'rightHalf', widerSwipePairCenterX: pairCenterX, originalColumnHint: potentialPartner.columnIndex }); nIdx++; } else { notesForFinalProcessing.push(note); } } finalMapNotes.push.apply(finalMapNotes, notesForFinalProcessing); } var uniqueNotesOverall = []; var seenNotesOverall = {}; finalMapNotes.sort(function (a, b) { return a.time - b.time; }); finalMapNotes.forEach(function (note) { var cX; var keyPartForColumn; if (note.partOfWiderSwipe) { cX = note.widerSwipePairCenterX + (note.partOfWiderSwipe === 'leftHalf' ? -(SWIPE_NOTE_WIDTH / 2) : SWIPE_NOTE_WIDTH / 2); keyPartForColumn = "pC" + note.widerSwipePairCenterX + "h" + (note.partOfWiderSwipe === 'leftHalf' ? 'L' : 'R'); } else if (note.columnIndex !== undefined) { cX = columnCenterXs[note.columnIndex]; keyPartForColumn = "c" + note.columnIndex; } else { cX = gameScreenWidth / 2; keyPartForColumn = "cX" + cX; } var key = "" + note.time + "_" + note.type + "_" + keyPartForColumn + "_" + (note.swipeDir || ''); if (!seenNotesOverall[key]) { uniqueNotesOverall.push(note); seenNotesOverall[key] = true; } else { // console.log("Filtered final duplicate note: " + key); } }); console.log("Processed map for: " + songKeyForLogging + " FINALLY contains " + uniqueNotesOverall.length + " notes."); return uniqueNotesOverall; } var hpBarsInitialized = false; var scoreTxt = new Text2('Score: 0', { size: 100, fill: 0xFFFFFF, alpha: 1 }); scoreTxt.anchor.set(1, 0); // Anchor center-top scoreTxt.x = gameScreenWidth / 1; scoreTxt.y = 20; // Position from the top of its container (gameUIContainer) gameUIContainer.addChild(scoreTxt); console.log("Restored scoreTxt: X=" + scoreTxt.x + " Y=" + scoreTxt.y + " Visible:" + scoreTxt.visible + " Parent: gameUIContainer"); var comboTxt = new Text2('Combo: 0', { size: 50, // Możesz dostosować rozmiar tekstu combo fill: 0xFFFF00, // Żółty kolor alpha: 0.5 }); comboTxt.anchor.set(0, 0.5); comboTxt.x = 100; comboTxt.y = 1000; comboTxt.rotation = -0.26; gameUIContainer.addChild(comboTxt); console.log("ComboTxt positioned: X=" + comboTxt.x + " Y=" + comboTxt.y + " Visible:" + comboTxt.visible + " Parent: gameUIContainer"); var hitZoneY = 1800; var hitZoneVisualWidth = playfieldWidth; function rectsIntersect(r1, r2) { return !(r2.x > r1.x + r1.width || r2.x + r2.width < r1.x || r2.y > r1.y + r1.height || r2.y + r2.height < r1.y); } function resetGameState() { notes.forEach(function (n) { if (n && n.parent) { n.destroy(); } }); notes = []; nextNoteIdx = 0; score = 0; combo = 0; maxCombo = 0; swipeStart = null; inputLocked = false; scoreTxt.setText('Score: 0'); comboTxt.setText('Combo: 0'); gameOverFlag = false; playerCurrentHP = playerMaxHP; bossCurrentHP = bossMaxHP; hpBarsInitialized = false; if (leftEye && leftEye.parent) { leftEye.destroy(); leftEye = null; } if (rightEye && rightEye.parent) { rightEye.destroy(); rightEye = null; } if (eyesBlinkTimer) { LK.clearTimeout(eyesBlinkTimer); eyesBlinkTimer = null; } if (isShieldActive) { isShieldActive = false; } if (shieldTimerDisplayContainer) { shieldTimerDisplayContainer.visible = false; } if (isPrecisionBuffActive) { isPrecisionBuffActive = false; if (originalHitWindowPerfect > 0) { hitWindowPerfect = originalHitWindowPerfect; } if (originalHitWindowGood > 0) { hitWindowGood = originalHitWindowGood; } } if (precisionBuffTimerDisplayContainer) { precisionBuffTimerDisplayContainer.visible = false; } if (hpBarsInitialized && playerHpBarFill && bossHpBarFill) { updatePlayerHpDisplay(); updateBossHpDisplay(); } if (endlessTimerTxt) { endlessTimerTxt.visible = false; } endlessStartTime = 0; endlessMissCount = 0; ambientParticles.forEach(function (p) { if (p && p.visual && p.visual.parent) { p.visual.destroy(); } }); ambientParticles = []; } function loadSong(songKey) { LK.stopMusic(); if (songSummaryContainer && songSummaryContainer.parent) { songSummaryContainer.destroy(); songSummaryContainer = null; } if (gameUIContainer) { gameUIContainer.visible = true; } setupGameplayElements(); lastPlayedSongKeyForRestart = songKey; bossWasDefeatedThisSong = false; var songData; if (isTutorialMode && songKey === "TutorialTrack") { songData = tutorialSongData; } else { songData = allSongData[songKey]; } if (!songData) { console.log("Error: Song data not found for key: " + songKey); if (allSongData["defaultTestTrack"]) { songData = allSongData["defaultTestTrack"]; console.log("Fallback to defaultTestTrack"); } else { currentActiveRhythmMap = []; console.log("No fallback song data found."); return; } } currentFightingBossId = null; if (!isTutorialMode) { for (var i = 0; i < allBossData.length; i++) { if (allBossData[i].songMapKey === songKey) { currentFightingBossId = allBossData[i].id; if (currentFightingBossId) { showBossIntroAnimation(currentFightingBossId); } break; } } } if (songData.config) { playerMaxHP = songData.config.playerMaxHP || 10; bossMaxHP = songData.config.bossMaxHP || 50; } else { playerMaxHP = 10; bossMaxHP = 50; } resetGameState(); createPlayerHUD(); createBossHUD(); if (gameplayBackground && gameplayBackground.parent) { gameplayBackground.destroy(); gameplayBackground = null; } gameplayBackground = LK.getAsset('gameplayBg', { x: 0, y: 0, width: gameScreenWidth, height: gameScreenHeight, alpha: 0.8 }); game.addChildAt(gameplayBackground, 0); if (gameUIContainer) { gameUIContainer.visible = true; } if (isTutorialMode) { if (scoreTxt) { scoreTxt.visible = false; } if (comboTxt) { comboTxt.visible = false; } } hpBarsInitialized = false; nextNoteIdx = 0; if (currentBossSprite && currentBossSprite.parent) { currentBossSprite.destroy(); currentBossSprite = null; } else if (isTutorialMode) { if (currentBossSprite && currentBossSprite.parent) { currentBossSprite.destroy(); currentBossSprite = null; } } if (songData.rawRhythmMap) { currentActiveRhythmMap = processRawRhythmMap(songData.rawRhythmMap, songKey); } else { currentActiveRhythmMap = []; } gameStartTime = Date.now(); LK.playMusic(songData.musicAsset, { loop: false }); currentScreenState = 'gameplay'; if (!isTutorialMode) { fadeInGameplayElements(1500); } else { if (staticHitFrame) { staticHitFrame.visible = true; } if (staticPerfectLine) { staticPerfectLine.visible = true; } } } function setupPowerUpDisplay() { var smallIconSize = 110; if (shieldTimerDisplayContainer && shieldTimerDisplayContainer.parent) { shieldTimerDisplayContainer.destroy(); } shieldTimerDisplayContainer = new Container(); shieldTimerDisplayContainer.x = gameScreenWidth - 120; shieldTimerDisplayContainer.y = 180; if (gameUIContainer) { gameUIContainer.addChild(shieldTimerDisplayContainer); } smallShieldIconDisplay = LK.getAsset('shieldAsset', { anchorX: 0.5, anchorY: 0.5, width: smallIconSize, height: smallIconSize }); shieldTimerDisplayContainer.addChild(smallShieldIconDisplay); shieldTimerTextDisplay = new Text2("", { size: 50, fill: 0xFFFFFF, anchorX: 0.5, anchorY: 0 }); shieldTimerTextDisplay.y = smallIconSize / 2 + 5; shieldTimerDisplayContainer.addChild(shieldTimerTextDisplay); shieldTimerDisplayContainer.visible = false; if (precisionBuffTimerDisplayContainer && precisionBuffTimerDisplayContainer.parent) { precisionBuffTimerDisplayContainer.destroy(); } precisionBuffTimerDisplayContainer = new Container(); precisionBuffTimerDisplayContainer.x = gameScreenWidth - 120; // Umieść poniżej timera tarczy lub w innym odpowiednim miejscu precisionBuffTimerDisplayContainer.y = shieldTimerDisplayContainer.y + smallIconSize + 40 + 10; if (gameUIContainer) { gameUIContainer.addChild(precisionBuffTimerDisplayContainer); } smallPrecisionIconDisplay = LK.getAsset('shieldAsset', { anchorX: 0.5, anchorY: 0.5, width: smallIconSize, height: smallIconSize }); precisionBuffTimerDisplayContainer.addChild(smallPrecisionIconDisplay); precisionBuffTimerTextDisplay = new Text2("", { size: 35, fill: 0xFFFFFF, anchorX: 0.5, anchorY: 0 }); precisionBuffTimerTextDisplay.y = smallIconSize / 2 + 5; precisionBuffTimerDisplayContainer.addChild(precisionBuffTimerTextDisplay); precisionBuffTimerDisplayContainer.visible = false; console.log("Timer UIs for Shield & Precision Buff created."); } function updatePowerUpDisplayCounts() { if (hpPotionCountText) { hpPotionCountText.setText("x" + collectedPowerUps.potion); shieldCountText.setText("x" + collectedPowerUps.shield); swipeToTapCountText.setText("x" + collectedPowerUps.swipeToTap); } } function updatePlayerHpDisplay() { if (playerHpBarFill) { var healthPercent = playerCurrentHP / playerMaxHP; playerHpBarFill.width = hpBarWidth * Math.max(0, healthPercent); } } function updateBossHpDisplay() { if (bossHpBarFill) { var healthPercent = bossCurrentHP / bossMaxHP; bossHpBarFill.width = hpBarWidth * Math.max(0, healthPercent); } } function spawnNotes() { if (!currentActiveRhythmMap || currentActiveRhythmMap.length === 0) { return; } var now = Date.now(); if (!currentActiveRhythmMap) { return; } while (nextNoteIdx < currentActiveRhythmMap.length) { var noteData = currentActiveRhythmMap[nextNoteIdx]; var noteTargetHitTime = gameStartTime + noteData.time; if (noteTargetHitTime - noteTravelTime <= now) { var targetCenterX; if (noteData.partOfWiderSwipe && noteData.widerSwipePairCenterX !== undefined) { if (noteData.partOfWiderSwipe === 'leftHalf') { targetCenterX = noteData.widerSwipePairCenterX - SWIPE_NOTE_WIDTH / 2; } else if (noteData.partOfWiderSwipe === 'rightHalf') { targetCenterX = noteData.widerSwipePairCenterX + SWIPE_NOTE_WIDTH / 2; } else { targetCenterX = columnCenterXs[noteData.originalColumnHint !== undefined ? noteData.originalColumnHint : Math.floor(NUM_COLUMNS / 2)]; } } else if (noteData.columnIndex !== undefined && noteData.columnIndex >= 0 && noteData.columnIndex < NUM_COLUMNS) { targetCenterX = columnCenterXs[noteData.columnIndex]; } else { targetCenterX = playfieldWidth / 2; console.warn("spawnNotes - Note spawned without proper columnIndex or widerSwipe info:", noteData); } var isBuffNoteFromGenerator = noteData.isBuffNote || false; var buffTypeFromGenerator = noteData.buffType || null; if (!isTutorialMode && !isFinalBossActive && noteData.type === 'tap' && !isBuffNoteFromGenerator) { var chance = currentScreenState === 'endlessLoopActive' ? ENDLESS_BUFF_CHANCE : BUFF_CHANCE; if (Math.random() < chance) { isBuffNoteFromGenerator = true; var availableBuffs = ['potion', 'shield', 'precision']; buffTypeFromGenerator = availableBuffs[Math.floor(Math.random() * availableBuffs.length)]; } } var n = new Note(noteData.type, noteData.swipeDir, noteTargetHitTime, targetCenterX, noteData.columnIndex, isBuffNoteFromGenerator, buffTypeFromGenerator, noteData.duration); n.mapData = noteData; if (noteData.partOfWiderSwipe) { n.isWiderSwipePart = true; } notes.push(n); game.addChild(n); nextNoteIdx++; } else { break; } } } function removeOldNotes() { var now = Date.now(); for (var i = notes.length - 1; i >= 0; i--) { var n = notes[i]; var timeToRemoveAfterJudged = 700; // ms po targetHitTime dla ocenionych notatek var timeToRemoveIfNotJudged = noteTravelTime / 2 + hitWindowGood + 500; // Dłuższy czas, jeśli nieoceniona, liczony od targetHitTime if (n.judged && now > n.targetHitTime + timeToRemoveAfterJudged) { if (n.parent) { n.destroy(); } notes.splice(i, 1); } else if (!n.judged && now > n.targetHitTime + timeToRemoveIfNotJudged) { if (n.noteType !== 'trap') {} if (n.parent) { n.destroy(); } notes.splice(i, 1); } } } function findNoteAt(x, y, typeToFind) { var now = Date.now(); var bestNote = null; var smallestTimeDiff = hitWindowGood + 1; for (var i = 0; i < notes.length; i++) { var n = notes[i]; if (n.judged || n.noteType !== typeToFind && !(typeToFind === 'tap' && n.isHoldNote && !n.isBeingHeld)) { continue; } var compensatedTargetTime = n.targetHitTime; var timeDiffWithCompensation = Math.abs(now - compensatedTargetTime); if (timeDiffWithCompensation > hitWindowGood) { continue; } var originalTimeDiff = Math.abs(now - n.targetHitTime); var targetYCenter, hitRadiusX, hitRadiusY; var spatialBuffMultiplier = isPrecisionBuffActive ? 1.5 : 1.0; if (n.isHoldNote) { targetYCenter = n.y + n.yOffset - HOLD_HITBOX_HEIGHT / 2; hitRadiusX = HOLD_HITBOX_WIDTH / 2 * spatialBuffMultiplier; hitRadiusY = HOLD_HITBOX_HEIGHT / 2 * spatialBuffMultiplier; } else if (n.noteAsset) { targetYCenter = n.y; hitRadiusX = n.noteAsset.width * n.scale.x / 2 * spatialBuffMultiplier * SPATIAL_HITBOX_MULTIPLIER; hitRadiusY = n.noteAsset.height * n.scale.y / 2 * spatialBuffMultiplier * SPATIAL_HITBOX_MULTIPLIER; } else { continue; } var dx = x - n.x; var dy = y - targetYCenter; if (Math.abs(dx) <= hitRadiusX && Math.abs(dy) <= hitRadiusY) { if (originalTimeDiff < smallestTimeDiff) { bestNote = n; smallestTimeDiff = originalTimeDiff; } } } return bestNote; } function addScore(result) { if (isTutorialMode) { return; } if (result === 'perfect') { score += 100; } else if (result === 'good') { score += 50; } scoreTxt.setText('Score: ' + score); } function addCombo() { if (isTutorialMode) { return; } combo += 1; if (combo > maxCombo) { maxCombo = combo; } comboTxt.setText('Combo: ' + combo); if (combo > 1) { var baseScale = 1.0; tween(comboTxt.scale, { x: baseScale * 1.3, y: baseScale * 1.3 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { tween(comboTxt.scale, { x: baseScale, y: baseScale }, { duration: 100, easing: tween.easeIn }); } }); } } function resetCombo() { combo = 0; comboTxt.setText('Combo: 0'); } function checkGameEnd() { if (isTutorialMode || gameOverFlag) { return; } if (playerCurrentHP <= 0) { gameOverFlag = true; console.log("GAME OVER - Player HP depleted"); if (currentScreenState === 'endlessLoopActive') { var finalTime = Date.now() - endlessStartTime; displayEndlessSummaryScreen({ time: finalTime, maxCombo: maxCombo, misses: endlessMissCount }); } else { var summaryData = { score: score, maxCombo: maxCombo, bossWasActuallyDefeated: bossWasDefeatedThisSong }; summaryData.statusMessage = "GAME OVER"; summaryData.bossWasActuallyDefeated = false; displayEndOfSongScreen(summaryData); } return; } if (bossCurrentHP <= 0 && !bossWasDefeatedThisSong) { bossWasDefeatedThisSong = true; console.log("Boss HP depleted during song! Player continues playing."); if (currentFightingBossId && bossUnlockProgress.hasOwnProperty(currentFightingBossId)) { bossUnlockProgress[currentFightingBossId] = true; console.log("Boss " + currentFightingBossId + " marked as defeated in progress."); storage[BOSS_UNLOCK_KEY] = bossUnlockProgress; console.log("Boss unlock progress saved to storage."); } } if (currentScreenState !== 'endlessLoopActive') { if (currentActiveRhythmMap && nextNoteIdx >= currentActiveRhythmMap.length && notes.length === 0) { gameOverFlag = true; console.log("SONG ENDED"); LK.stopMusic(); var summaryData = { score: score, maxCombo: maxCombo, bossWasActuallyDefeated: bossWasDefeatedThisSong }; if (bossWasDefeatedThisSong) { summaryData.statusMessage = "VICTORY!"; } else { summaryData.statusMessage = "SONG COMPLETED"; } summaryData.bossWasActuallyDefeated = bossWasDefeatedThisSong; displayEndOfSongScreen(summaryData); return; } } } function getSongStats(songMapKey) { console.log("getSongStats called for songMapKey:", songMapKey); if (!songMapKey) { console.warn("getSongStats: No songMapKey provided, returning default stats."); return { bestScore: 0, bestCombo: 0 }; } var individualSongStorageKey = 'wf_stats_' + songMapKey; console.log("getSongStats: Attempting to read from storage key:", individualSongStorageKey); var songStats = storage[individualSongStorageKey]; // ZMIENIONA LINIA DEBUGOWANIA: console.log("getSongStats: Raw data from storage for " + individualSongStorageKey + ":", songStats); // Po prostu logujemy surowy obiekt songStats, bez JSON.parse(JSON.stringify(...)) if (songStats) { var statsToReturn = { bestScore: parseInt(songStats.bestScore, 10) || 0, bestCombo: parseInt(songStats.bestCombo, 10) || 0 }; console.log("getSongStats: Parsed and returning stats:", statsToReturn); return statsToReturn; } console.log("getSongStats: No stats found in storage for " + individualSongStorageKey + ", returning default stats."); return { bestScore: 0, bestCombo: 0 }; } function saveSongStats(songMapKey, currentScore, currentCombo) { if (!songMapKey) { return; } var individualSongStorageKey = 'wf_stats_' + songMapKey; // Unikalny klucz dla piosenki // Odczytaj istniejące statystyki dla tej konkretnej piosenki lub utwórz nowy obiekt var storedData = storage[individualSongStorageKey]; var songStats; if (storedData) { songStats = { bestScore: storedData.bestScore, bestCombo: storedData.bestCombo }; } else { songStats = { bestScore: 0, bestCombo: 0 }; } var updated = false; var numericCurrentScore = parseInt(currentScore, 10) || 0; var numericCurrentCombo = parseInt(currentCombo, 10) || 0; if (numericCurrentScore > (parseInt(songStats.bestScore, 10) || 0)) { songStats.bestScore = numericCurrentScore; updated = true; console.log("New best score for " + songMapKey + " (" + individualSongStorageKey + "): " + numericCurrentScore); } if (numericCurrentCombo > (parseInt(songStats.bestCombo, 10) || 0)) { songStats.bestCombo = numericCurrentCombo; updated = true; console.log("New best combo for " + songMapKey + " (" + individualSongStorageKey + "): " + numericCurrentCombo); } if (updated) { storage[individualSongStorageKey] = songStats; // Zapisz obiekt statystyk dla tej piosenki console.log("Song stats saved to storage for key: " + individualSongStorageKey); } } function formatTime(ms) { var totalSeconds = Math.floor(ms / 1000); var minutes = Math.floor(totalSeconds / 60); var seconds = totalSeconds % 60; return (minutes < 10 ? '0' : '') + minutes + ':' + (seconds < 10 ? '0' : '') + seconds; } function displayLockedMessage(containerToFade, parentContainer, referenceObject) { if (isLockedBossMessageActive) { return; } isLockedBossMessageActive = true; if (containerToFade) { tween(containerToFade, { alpha: 0 }, { duration: 400, easing: tween.easeOut, onFinish: function onFinish() { if (containerToFade) { containerToFade.visible = false; } } }); } var centerX = 380 + 1150 / 2; var centerY = 1020 + 890 / 2; var lockedGraphic = LK.getAsset('silasLockedMessage', { anchorX: 0.5, anchorY: 0.5, x: centerX, y: centerY - 85, alpha: 0 }); if (parentContainer && referenceObject && referenceObject.parent === parentContainer) { var referenceIndex = parentContainer.getChildIndex(referenceObject); parentContainer.addChildAt(lockedGraphic, referenceIndex); } else { game.addChild(lockedGraphic); } tween(lockedGraphic, { alpha: 1 }, { duration: 800, easing: tween.easeIn }); LK.setTimeout(function () { tween(lockedGraphic, { alpha: 0 }, { duration: 800, easing: tween.easeOut, onFinish: function onFinish() { if (lockedGraphic.parent) { lockedGraphic.destroy(); } if (containerToFade) { containerToFade.visible = true; tween(containerToFade, { alpha: 1 }, { duration: 400, easing: tween.easeIn, onFinish: function onFinish() { isLockedBossMessageActive = false; } }); } else { isLockedBossMessageActive = false; } } }); }, 4000); } function getEndlessStats() { var stats = storage[ENDLESS_STATS_KEY]; if (stats) { return { bestTime: parseInt(stats.bestTime, 10) || 0, bestCombo: parseInt(stats.bestCombo, 10) || 0 }; } return { bestTime: 0, bestCombo: 0 }; } function saveEndlessStats(currentTime, currentMaxCombo) { var stats = getEndlessStats(); var numericCurrentTime = parseInt(currentTime, 10) || 0; var numericCurrentCombo = parseInt(currentMaxCombo, 10) || 0; var updated = false; if (numericCurrentTime > stats.bestTime) { stats.bestTime = numericCurrentTime; console.log("New best endless time saved: " + numericCurrentTime); updated = true; } if (numericCurrentCombo > stats.bestCombo) { stats.bestCombo = numericCurrentCombo; console.log("New best endless combo saved: " + numericCurrentCombo); updated = true; } if (updated) { storage[ENDLESS_STATS_KEY] = stats; } } function startEndlessMode() { LK.stopMusic(); endlessMusicPhaseIndex = 0; showEndlessIntro(); LK.playMusic('endless_intro_music', { loop: true }); } function showBossIntroAnimation(bossId) { if (!bossId) { return; } var graphicAssetKey; if (bossId === "FinalBoss") { graphicAssetKey = 'boss_intro_graphic_final'; } else { graphicAssetKey = 'boss_intro_graphic_' + bossId; } var introGraphic = LK.getAsset(graphicAssetKey, { anchorX: 0.5, anchorY: 0.5, scale: { x: 2.5, y: 2.5 } }); if (!introGraphic) { return; } var startX = -300; var centerX = gameScreenWidth / 2; var endX = gameScreenWidth + 300; var centerY = gameScreenHeight / 2 - 400; introGraphic.x = startX; introGraphic.y = centerY; introGraphic.alpha = 0; game.addChild(introGraphic); var animationSequence = function animationSequence() { var levitateTween = null; var onEnterComplete = function onEnterComplete() { var levitateUp = { y: centerY - 30 }; var levitateDown = { y: centerY + 30 }; var doLevitate = function doLevitate() { if (!introGraphic || !introGraphic.parent) { return; } levitateTween = tween(introGraphic, introGraphic.y === levitateDown.y ? levitateUp : levitateDown, { duration: 1500, easing: tween.easeInOutSine, onFinish: doLevitate }); }; doLevitate(); LK.setTimeout(function () { if (levitateTween) { levitateTween.stop(); } if (!introGraphic || !introGraphic.parent) { return; } tween(introGraphic, { x: endX, alpha: 0 }, { duration: 1000, easing: tween.easeInCubic, onFinish: function onFinish() { if (introGraphic.parent) { introGraphic.destroy(); } } }); }, 3000); }; tween(introGraphic, { x: centerX, alpha: 1 }, { duration: 1000, easing: tween.easeOutCubic, onFinish: onEnterComplete }); }; LK.setTimeout(animationSequence, 500); } function showFinalBossIntro(onComplete) { var introElements = []; var slideTimeoutId = null; var currentSlideObject = null; var slides = [{ asset: 'final_intro_slide_1', duration: 4000 }, { asset: 'final_intro_slide_2', duration: 4000 }, { asset: 'final_intro_slide_3', duration: 8000 }, { asset: 'final_intro_slide_4', duration: 5500 }, { asset: 'final_intro_slide_5', duration: 6500, zoom: 1.1 }, { asset: 'black_screen_asset', duration: 1500 }]; function cleanupIntro() { if (slideTimeoutId) { LK.clearTimeout(slideTimeoutId); slideTimeoutId = null; } introElements.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); introElements = []; if (currentSlideObject && currentSlideObject.parent) { currentSlideObject.destroy(); } LK.stopMusic(); if (onComplete) { onComplete(); } } var skipButton = new Text2("SKIP", { size: 60, fill: 0xBBBBBB, align: 'right' }); skipButton.anchor.set(1, 0); skipButton.x = gameScreenWidth - 40; skipButton.y = 40; skipButton.interactive = true; skipButton.cursor = "pointer"; skipButton.down = cleanupIntro; game.addChild(skipButton); introElements.push(skipButton); function displaySlide(index) { if (currentSlideObject) { tween(currentSlideObject, { alpha: 0 }, { duration: 500, onFinish: function onFinish() { if (currentSlideObject && currentSlideObject.parent) { currentSlideObject.destroy(); } showNext(index); } }); } else { showNext(index); } } function showNext(index) { if (index >= slides.length) { cleanupIntro(); return; } var slideData = slides[index]; currentSlideObject = LK.getAsset(slideData.asset, { x: gameScreenWidth / 2, y: gameScreenHeight / 2, anchorX: 0.5, anchorY: 0.5, width: gameScreenWidth, height: gameScreenHeight, alpha: 0 }); game.addChildAt(currentSlideObject, 0); introElements.push(currentSlideObject); tween(currentSlideObject, { alpha: 1 }, { duration: 500, onFinish: function onFinish() { if (slideData.zoom) { tween(currentSlideObject.scale, { x: slideData.zoom, y: slideData.zoom }, { duration: slideData.duration, easing: tween.linear }); } slideTimeoutId = LK.setTimeout(function () { displaySlide(index + 1); }, slideData.duration); } }); } LK.playMusic('final_intro'); displaySlide(0); } function loadFinalBossEncounter() { LK.stopMusic(); currentScreenState = 'gameplay'; isFinalBossActive = true; nextSpecialEventIdx = 0; var songData = allSongData["FinalBossTrack"]; if (!songData) { console.log("CRITICAL ERROR: FinalBossTrack data not found!"); return; } resetGameState(); if (gameplayBackground && gameplayBackground.parent) { gameplayBackground.destroy(); gameplayBackground = null; } gameplayBackground = LK.getAsset(songData.backgroundAssetKey, { x: 0, y: 0, width: gameScreenWidth, height: gameScreenHeight, alpha: 0.8 }); game.addChildAt(gameplayBackground, 0); if (songData.config) { playerMaxHP = songData.config.playerMaxHP || 10; bossMaxHP = songData.config.bossMaxHP || 50; } playerCurrentHP = playerMaxHP; bossCurrentHP = bossMaxHP; if (gameUIContainer) { gameUIContainer.visible = true; } createPlayerHUD(); createBossHUD(); setupGameplayElements(); fadeInGameplayElements(1500); currentFightingBossId = "FinalBoss"; showBossIntroAnimation(currentFightingBossId); currentActiveRhythmMap = processRawRhythmMap(songData.rawRhythmMap, "FinalBossTrack"); gameStartTime = Date.now(); LK.playMusic(songData.musicAsset, { loop: false }); } function fadeGameplay(direction, onComplete) { var targetAlpha = direction === 'out' ? 0 : 1; var gameplayElements = [gameplayBackground, gameUIContainer, staticHitFrame, staticPerfectLine]; var fadedCount = 0; var totalToFade = gameplayElements.length; gameplayElements.forEach(function (el) { if (el) { tween(el, { alpha: targetAlpha }, { duration: 800, easing: tween.easeOut, onFinish: function onFinish() { fadedCount++; if (fadedCount === totalToFade && onComplete) { onComplete(); } } }); } else { fadedCount++; if (fadedCount === totalToFade && onComplete) { onComplete(); } } }); } function showMidBattleCutscene(onComplete) { var cutsceneElements = []; var cutsceneTimeoutIds = []; isMidCutsceneActive = true; var cutsceneSequence = [{ type: 'zoom_rotate', asset: 'mid_cutscene_slide_1', duration: 6000, width: 1800, height: 2400, startScale: 1.0, endScale: 1.2, endRotation: 0.1 }, { type: 'fullscreen', asset: 'mid_cutscene_slide_2', duration: 3000 }, { type: 'multi_sequential_zoom', inter_delay: 3000, final_wait: 4000, slides: [{ asset: 'mid_cutscene_slide_3', x: gameScreenWidth * 0.75, y: gameScreenHeight * 0.25, startScale: 0.4, endScale: 0.7, duration: 8000 }, { asset: 'mid_cutscene_slide_4', x: gameScreenWidth * 0.25, y: gameScreenHeight * 0.75, startScale: 0.4, endScale: 0.7, duration: 10000 }, { asset: 'mid_cutscene_slide_5', x: gameScreenWidth * 0.5, y: gameScreenHeight * 0.5, startScale: 0.4, endScale: 0.8, duration: 8000 }] }, { type: 'fullscreen', asset: 'mid_cutscene_slide_6', duration: 1500 }, { type: 'multi_sequential_zoom', inter_delay: 2200, final_wait: 7000, slides: [{ asset: 'mid_cutscene_slide_7', duration: 11000, startScale: 0.4, endScale: 1.0, x: gameScreenWidth * 0.25, y: gameScreenHeight * 0.20 }, { asset: 'mid_cutscene_slide_8', duration: 11000, startScale: 0.4, endScale: 1.0, x: gameScreenWidth * 0.75, y: gameScreenHeight * 0.20 }, { asset: 'mid_cutscene_slide_9', duration: 11000, startScale: 0.4, endScale: 1.0, x: gameScreenWidth * 0.25, y: gameScreenHeight * 0.40 }, { asset: 'mid_cutscene_slide_10', duration: 11000, startScale: 0.4, endScale: 1.0, x: gameScreenWidth * 0.75, y: gameScreenHeight * 0.40 }, { asset: 'mid_cutscene_slide_11', duration: 11000, startScale: 0.4, endScale: 1.0, x: gameScreenWidth * 0.25, y: gameScreenHeight * 0.60 }, { asset: 'mid_cutscene_slide_12', duration: 11000, startScale: 0.4, endScale: 1.0, x: gameScreenWidth * 0.75, y: gameScreenHeight * 0.60 }, { asset: 'mid_cutscene_slide_13', duration: 11000, startScale: 0.4, endScale: 1.0, x: gameScreenWidth * 0.25, y: gameScreenHeight * 0.80 }, { asset: 'mid_cutscene_slide_14', duration: 11000, startScale: 0.4, endScale: 1.0, x: gameScreenWidth * 0.75, y: gameScreenHeight * 0.80 }] }, { type: 'fullscreen', asset: 'mid_cutscene_slide_15', duration: 4000 }, { type: 'fullscreen', asset: 'mid_cutscene_slide_16', duration: 3000 }]; function cleanupCutscene() { cutsceneTimeoutIds.forEach(function (id) { LK.clearTimeout(id); }); cutsceneElements.forEach(function (el) { if (el && el.parent) { el.destroy(); } }); isMidCutsceneActive = false; if (onComplete) { onComplete(); } } var stageIndex = -1; function nextStage() { stageIndex++; if (stageIndex >= cutsceneSequence.length) { cleanupCutscene(); return; } var stageData = cutsceneSequence[stageIndex]; var fadeInSlide = function fadeInSlide(slide, onVisible) { game.addChild(slide); cutsceneElements.push(slide); tween(slide, { alpha: 1 }, { duration: 500, onFinish: onVisible }); }; var fadeOutSlides = function fadeOutSlides(slidesToFade, onFaded) { var faded = 0; if (slidesToFade.length === 0 && onFaded) { onFaded(); return; } slidesToFade.forEach(function (el) { tween(el, { alpha: 0 }, { duration: 500, onFinish: function onFinish() { if (el.parent) { el.destroy(); } faded++; if (faded === slidesToFade.length && onFaded) { onFaded(); } } }); }); }; if (stageData.type === 'fullscreen' || stageData.type === 'zoom_rotate') { var slide = LK.getAsset(stageData.asset, { x: gameScreenWidth / 2, y: gameScreenHeight / 2, anchorX: 0.5, anchorY: 0.5, width: stageData.width || gameScreenWidth, height: stageData.height || gameScreenHeight, alpha: 0, rotation: stageData.startRotation || 0, scale: { x: stageData.startScale || 1, y: stageData.startScale || 1 } }); fadeInSlide(slide, function () { if (stageData.type === 'zoom_rotate') { tween(slide.scale, { x: stageData.endScale, y: stageData.endScale }, { duration: stageData.duration, easing: tween.linear }); tween(slide, { rotation: stageData.endRotation }, { duration: stageData.duration, easing: tween.linear }); } var tid = LK.setTimeout(function () { fadeOutSlides([slide], nextStage); }, stageData.duration); cutsceneTimeoutIds.push(tid); }); } else if (stageData.type === 'multi_sequential_zoom') { var activeSlides = []; stageData.slides.forEach(function (slideData, i) { var tid1 = LK.setTimeout(function () { var xPos = slideData.x !== undefined ? slideData.x : gameScreenWidth * (0.15 + Math.random() * 0.7); var yPos = slideData.y !== undefined ? slideData.y : gameScreenHeight * (0.15 + Math.random() * 0.7); var slide = LK.getAsset(slideData.asset, { x: xPos, y: yPos, anchorX: 0.5, anchorY: 0.5, alpha: 0, scale: { x: slideData.startScale, y: slideData.startScale } }); activeSlides.push(slide); cutsceneElements.push(slide); fadeInSlide(slide, function () { tween(slide.scale, { x: slideData.endScale, y: slideData.endScale }, { duration: slideData.duration, easing: tween.easeInQuad }); }); if (i === stageData.slides.length - 1) { var tid2 = LK.setTimeout(function () { fadeOutSlides(activeSlides, nextStage); }, stageData.final_wait); cutsceneTimeoutIds.push(tid2); } }, i * stageData.inter_delay); cutsceneTimeoutIds.push(tid1); }); } } nextStage(); } function showHelperBoss(bossId, text, columnIndex) { var localHelperContainer = new Container(); activeHelperBosses.push(localHelperContainer); var bossData = allBossData.find(function (b) { return b.id === bossId; }); var assetKey = bossData ? bossData.cardAssetKey : 'boss1'; var bossSprite = LK.getAsset(assetKey, { anchorX: 0.5, anchorY: 0.5, alpha: 1 }); var bubbleText = new Text2(text || "I've got this!", { size: 40, fill: 0xFFFF00, stroke: 0x000000, strokeThickness: 4 }); bubbleText.anchor.set(0.5, 1); localHelperContainer.addChild(bossSprite); localHelperContainer.addChild(bubbleText); if (columnIndex !== undefined) { bossSprite.width = 300; bossSprite.height = 300; bubbleText.y = -160; localHelperContainer.x = columnCenterXs[columnIndex]; localHelperContainer.y = hitZoneY; localHelperContainer.scale.set(1.2); } else { bossSprite.width = 200; bossSprite.height = 200; bubbleText.y = -110; localHelperContainer.x = PLAYER_HP_BAR_X + hpBarWidth / 2 + 260; localHelperContainer.y = PLAYER_HP_BAR_Y; localHelperContainer.scale.set(2.0); } localHelperContainer.alpha = 0; game.addChild(localHelperContainer); game.setChildIndex(localHelperContainer, game.children.length - 1); tween(localHelperContainer, { alpha: 1 }, { duration: 300 }); return localHelperContainer; } function clearAmbientParticles() { while (ambientParticles.length > 0) { var p = ambientParticles.pop(); if (p && p.visual && p.visual.parent) { p.visual.destroy(); } } } function clearAllHelpers() { while (activeHelperBosses.length > 0) { var helper = activeHelperBosses.pop(); if (helper && helper.parent) { helper.destroy(); } } autoplayColumns = [false, false, false]; } function hideHelperBoss(containerToHide) { if (containerToHide && containerToHide.parent) { var index = activeHelperBosses.indexOf(containerToHide); if (index > -1) { activeHelperBosses.splice(index, 1); } tween(containerToHide, { alpha: 0 }, { duration: 300, onFinish: function onFinish() { if (containerToHide && containerToHide.parent) { containerToHide.destroy(); } } }); } } function scheduleAutoplayEnd(targetColumn, duration) { LK.setTimeout(function () { if (targetColumn !== undefined) { autoplayColumns[targetColumn] = false; } hideHelperBoss(); }, duration); } function displayEndOfSongScreen(summaryData) { if (songSummaryContainer && songSummaryContainer.parent) { songSummaryContainer.destroy(); } songSummaryContainer = new Container(); songSummaryContainer.x = 0; songSummaryContainer.y = 0; game.addChild(songSummaryContainer); currentScreenState = 'songSummary'; if (lastPlayedSongKeyForRestart) { saveSongStats(lastPlayedSongKeyForRestart, summaryData.score, summaryData.maxCombo); } var bestStats = getSongStats(lastPlayedSongKeyForRestart || summaryData.songMapKey); var overlay = LK.getAsset('summaryOverlayAsset', { width: gameScreenWidth, height: gameScreenHeight, alpha: 0.7, interactive: true }); songSummaryContainer.addChild(overlay); var popupWidth = gameScreenWidth * 0.6; var popupHeight = 2220; var popupX = (gameScreenWidth - popupWidth) / 2; var popupY = (gameScreenHeight - popupHeight) / 2; var popupBackground = LK.getAsset('summaryPopupBackgroundAsset', { x: popupX, y: popupY, width: popupWidth, height: popupHeight }); songSummaryContainer.addChild(popupBackground); var v_gap_title = 80; var v_gap_stats = 55; var v_gap_bests = 55; var v_gap_buttons = 90; var titleText = new Text2(summaryData.statusMessage || "SONG ENDED", { size: 70, fill: 0xFFFFFF, align: 'center' }); var bossDefeatedContainer = new Container(); var bossDefeatedStatusText = new Text2("Boss Defeated: ", { size: 60, fill: 0xFFFFFF }); var bossDefeatedValueText = new Text2(summaryData.bossWasActuallyDefeated ? "YES" : "NO", { size: 60, fill: summaryData.bossWasActuallyDefeated ? 0x00FF00 : 0xFF0000 }); bossDefeatedValueText.x = bossDefeatedStatusText.width + 10; bossDefeatedContainer.addChild(bossDefeatedStatusText); bossDefeatedContainer.addChild(bossDefeatedValueText); var scoreTextSummary = new Text2("Score: " + summaryData.score, { size: 50, fill: 0xFFFFFF, align: 'center' }); var comboTextSummary = new Text2("Max Combo: " + summaryData.maxCombo, { size: 50, fill: 0xFFFFFF, align: 'center' }); var bestScoreText = new Text2("Best Score: " + bestStats.bestScore, { size: 50, fill: 0xFFFF00, align: 'center' }); var bestComboText = new Text2("Best Combo: " + bestStats.bestCombo, { size: 50, fill: 0xFFFF00, align: 'center' }); var allElements = [titleText, bossDefeatedContainer, scoreTextSummary, comboTextSummary, bestScoreText, bestComboText]; var gaps = [v_gap_title, v_gap_stats, v_gap_stats, v_gap_bests, v_gap_bests, v_gap_buttons]; var totalContentHeight = 0; for (var i = 0; i < allElements.length; i++) { totalContentHeight += allElements[i].height; if (gaps[i]) { totalContentHeight += gaps[i]; } } var buttonHeight = 70; totalContentHeight += buttonHeight; var currentY = popupY + (popupHeight - totalContentHeight) / 2; allElements.forEach(function (element, index) { element.y = currentY + element.height / 2; element.x = popupX + popupWidth / 2; if (element.anchor) { element.anchor.set(0.5, 0.5); } else { element.pivot.x = element.width / 2; element.pivot.y = element.height / 2; } songSummaryContainer.addChild(element); currentY += element.height + gaps[index]; }); var buttonWidth = popupWidth * 0.4; var buttonY = currentY + buttonHeight / 2; var backButtonBg = LK.getAsset('summaryButtonBackgroundAsset', { x: popupX + (popupWidth / 2 - buttonWidth - 15), y: buttonY, width: buttonWidth, height: buttonHeight, interactive: true, cursor: "pointer" }); songSummaryContainer.addChild(backButtonBg); var backToMenuButton = new Text2("Back to Menu", { size: 40, fill: 0xFFD700, stroke: 0x000000, strokeThickness: 2 }); backToMenuButton.anchor.set(0.5, 0.5); backToMenuButton.x = backButtonBg.x + buttonWidth / 2; backToMenuButton.y = backButtonBg.y + buttonHeight / 2; songSummaryContainer.addChild(backToMenuButton); backButtonBg.down = function () { LK.stopMusic(); if (songSummaryContainer && songSummaryContainer.parent) { songSummaryContainer.destroy(); songSummaryContainer = null; } if (gameplayBackground && gameplayBackground.parent) { gameplayBackground.destroy(); gameplayBackground = null; } showBossSelectionScreen(); }; var restartButtonBg = LK.getAsset('summaryButtonBackgroundAsset', { x: popupX + (popupWidth / 2 + 15), y: buttonY, width: buttonWidth, height: buttonHeight, interactive: true, cursor: "pointer" }); songSummaryContainer.addChild(restartButtonBg); var restartButton = new Text2("Restart Battle", { size: 40, fill: 0xFFD700, stroke: 0x000000, strokeThickness: 2 }); restartButton.anchor.set(0.5, 0.5); restartButton.x = restartButtonBg.x + buttonWidth / 2; restartButton.y = restartButtonBg.y + buttonHeight / 2; songSummaryContainer.addChild(restartButton); restartButtonBg.down = function () { if (songSummaryContainer && songSummaryContainer.parent) { songSummaryContainer.destroy(); songSummaryContainer = null; } if (currentFightingBossId === "FinalBoss") { loadFinalBossEncounter(); } else if (lastPlayedSongKeyForRestart) { loadSong(lastPlayedSongKeyForRestart); } else { showMainMenu(); } }; if (gameUIContainer) { gameUIContainer.visible = false; } if (staticHitFrame) { staticHitFrame.visible = false; } if (staticPerfectLine) { staticPerfectLine.visible = false; } } game.onNoteMiss = function (note) { if (!note) { return; } note.showHitFeedback('miss'); if (!isTutorialMode) { if (isShieldActive) { console.log("Gracz ominął nutę, ale tarcza jest aktywna! Brak utraty HP i combo NIE zresetowane."); } else { resetCombo(); if (currentScreenState === 'endlessLoopActive') { endlessMissCount++; } if (!gameOverFlag) { playerCurrentHP = Math.max(0, playerCurrentHP - 1); updatePlayerHpDisplay(); console.log("Player HP after miss: " + playerCurrentHP); } } } if (note.parent) { LK.effects.flashObject(note, 0xff0000, 300); } }; function createAmbientParticle(columnIndex, direction) { var particleAssetKey = AMBIENT_PARTICLE_ASSETS[columnIndex]; var columnX = columnCenterXs[columnIndex]; var columnWidth = columnFlashWidths[columnIndex]; var spawnX = columnX + (Math.random() - 0.5) * columnWidth; var spawnY, initialVY; if (direction === 'down') { spawnY = -20; initialVY = 6 + Math.random() * 8; } else { spawnY = gameScreenHeight + 20; initialVY = -6 + Math.random() * -8; } var particle = { vx: (Math.random() - 0.5) * 2.5, vy: initialVY, lifespan: 80 + Math.random() * 70, age: 0 }; particle.visual = LK.getAsset(particleAssetKey, { anchorX: 0.5, anchorY: 0.5, x: spawnX, y: spawnY }); var randomScale = 0.6 + Math.random() * 1.2; particle.visual.scale.set(randomScale, randomScale); game.addChild(particle.visual); ambientParticles.push(particle); } function updateAmbientParticles() { for (var i = ambientParticles.length - 1; i >= 0; i--) { var p = ambientParticles[i]; p.age++; p.visual.x += p.vx; p.visual.y += p.vy; p.vx *= 0.995; p.vy *= 0.995; p.vy += 0.05; p.visual.alpha = 1 - p.age / p.lifespan; if (p.age >= p.lifespan) { p.visual.destroy(); ambientParticles.splice(i, 1); } } } game.down = function (x, y, obj) { if (currentScreenState === 'gameplay' || currentScreenState === 'endlessLoopActive') { if (inputLocked) { return; } swipeStart = { x: x, y: y, time: Date.now() }; var now = Date.now(); for (var i_gp_pu = activeHelperBosses.length - 1; i_gp_pu >= 0; i_gp_pu--) { var pItem_gp = activeHelperBosses[i_gp_pu]; if (pItem_gp && !pItem_gp.collected && pItem_gp.visualAsset && pItem_gp.parent) { var pWidth_gp = pItem_gp.visualAsset.width * pItem_gp.scale.x; var pHeight_gp = pItem_gp.visualAsset.height * pItem_gp.scale.y; if (x >= pItem_gp.x - pWidth_gp / 2 && x <= pItem_gp.x + pWidth_gp / 2 && y >= pItem_gp.y - pHeight_gp / 2 && y <= pItem_gp.y + pHeight_gp / 2) { if (Math.abs(pItem_gp.y - hitZoneY) < pHeight_gp * 1.5) { pItem_gp.collect(); return; } } } } var noteUnderCursorTrap = findNoteAt(x, y, 'trap'); if (noteUnderCursorTrap && !noteUnderCursorTrap.judged && noteUnderCursorTrap.isInHitWindow()) { noteUnderCursorTrap.judged = true; noteUnderCursorTrap.showHitFeedback('miss'); if (!isTutorialMode) { if (isShieldActive) { console.log("Gracz trafił w TRAP NOTE, ale tarcza jest aktywna! Brak utraty HP i combo NIE zresetowane."); } else { resetCombo(); LK.effects.flashScreen(0xff0000, 400); if (currentScreenState === 'endlessLoopActive') { endlessMissCount++; } if (!gameOverFlag) { playerCurrentHP = Math.max(0, playerCurrentHP - 5); updatePlayerHpDisplay(); if (playerCurrentHP <= 0) { LK.stopMusic(); } } } } if (noteUnderCursorTrap.alpha > 0) { noteUnderCursorTrap.alpha = 0; } inputLocked = true; LK.setTimeout(function () { inputLocked = false; }, 200); return; } var noteUnderCursor = findNoteAt(x, y, 'tap'); if (noteUnderCursor && !noteUnderCursor.judged && !noteUnderCursor.isBeingHeld && noteUnderCursor.isInHitWindow()) { var result = noteUnderCursor.getHitAccuracy(); noteUnderCursor.hit = true; if (noteUnderCursor.isHoldNote) { if (result !== 'miss') { noteUnderCursor.isBeingHeld = true; noteUnderCursor.holdPressTime = now; noteUnderCursor.showHitFeedback(result); if (noteUnderCursor.noteColumnIndex !== undefined) { if (!isFinalBossActive) { var overlay = columnFlashOverlays[noteUnderCursor.noteColumnIndex]; if (overlay) { overlay.alpha = 0.5; } } } if (!isTutorialMode) { addScore(result); addCombo(); if (!gameOverFlag) { if (result === 'perfect') { bossCurrentHP = Math.max(0, bossCurrentHP - 2); } else if (result === 'good') { bossCurrentHP = Math.max(0, bossCurrentHP - 1); } updateBossHpDisplay(); } } if (noteUnderCursor.mapData && noteUnderCursor.mapData.columnIndex !== undefined) { currentlyHeldNotes[noteUnderCursor.mapData.columnIndex] = noteUnderCursor; } else if (noteUnderCursor.originalColumnHint !== undefined) { currentlyHeldNotes[noteUnderCursor.originalColumnHint] = noteUnderCursor; } } else { noteUnderCursor.judged = true; noteUnderCursor.showHitFeedback('miss'); if (!isTutorialMode && !isShieldActive) { resetCombo(); } if (noteUnderCursor.alpha > 0) { noteUnderCursor.alpha = 0; } } } else { noteUnderCursor.judged = true; noteUnderCursor.showHitFeedback(result); if (noteUnderCursor.noteColumnIndex !== undefined) { flashColumn(noteUnderCursor.noteColumnIndex); } if (noteUnderCursor.isBuffNote) { if (result !== 'miss' && !isTutorialMode) { var buffType = noteUnderCursor.buffType; if (buffType === 'potion') { playerCurrentHP = Math.min(playerMaxHP, playerCurrentHP + POTION_HEAL_AMOUNT); updatePlayerHpDisplay(); } else if (buffType === 'shield') { if (!isShieldActive) { isShieldActive = true; shieldEndTime = Date.now() + SHIELD_DURATION; if (shieldTimerDisplayContainer) { shieldTimerDisplayContainer.visible = true; } } } else if (buffType === 'precision') { if (!isPrecisionBuffActive) { isPrecisionBuffActive = true; precisionBuffEndTime = Date.now() + PRECISION_BUFF_DURATION; originalHitWindowPerfect = hitWindowPerfect; originalHitWindowGood = hitWindowGood; hitWindowPerfect = Math.round(hitWindowPerfect * precisionBuffHitWindowMultiplier); hitWindowGood = Math.round(hitWindowGood * precisionBuffHitWindowMultiplier); if (precisionBuffTimerDisplayContainer) { precisionBuffTimerDisplayContainer.visible = true; } if (staticHitFrame) { tween(staticHitFrame, { height: STATIC_HIT_FRAME_HEIGHT * 2 }, { duration: 250, easing: tween.easeOutQuad }); } } } } else if (result === 'miss' && !isTutorialMode && !isShieldActive) { resetCombo(); } } else { if (result !== 'miss') { addScore(result); addCombo(); if (!isTutorialMode && !gameOverFlag) { if (result === 'perfect') { bossCurrentHP = Math.max(0, bossCurrentHP - 2); } else if (result === 'good') { bossCurrentHP = Math.max(0, bossCurrentHP - 1); } updateBossHpDisplay(); } } else if (!isTutorialMode) { if (!isShieldActive) { resetCombo(); } else { console.log("Tapnięcie nuty ocenione jako 'miss', ale tarcza jest aktywna! Combo NIE zresetowane."); } } } } inputLocked = true; LK.setTimeout(function () { inputLocked = false; }, 120); return; } } }; game.move = function (x, y, obj) {}; game.up = function (x, y, obj) { if (currentScreenState === 'gameplay' || currentScreenState === 'endlessLoopActive') { var holdReleasedThisUp = false; for (var colIdx in currentlyHeldNotes) { if (currentlyHeldNotes.hasOwnProperty(colIdx)) { var heldNote = currentlyHeldNotes[colIdx]; if (heldNote && heldNote.isBeingHeld) { console.log("Releasing hold note in column: " + (heldNote.noteColumnIndex !== undefined ? heldNote.noteColumnIndex : heldNote.mapData ? heldNote.mapData.columnIndex : 'unknown')); heldNote.judgeHoldRelease(); delete currentlyHeldNotes[colIdx]; holdReleasedThisUp = true; } } } if (holdReleasedThisUp) { swipeStart = null; inputLocked = true; LK.setTimeout(function () { inputLocked = false; }, 80); return; } if (inputLocked || !swipeStart) { swipeStart = null; return; } var swipeEndX = x; var swipeEndY = y; var swipeEndTime = Date.now(); var dx = swipeEndX - swipeStart.x; var dy = swipeEndY - swipeStart.y; var dist = Math.sqrt(dx * dx + dy * dy); var potentialSwipe = dist >= MIN_SWIPE_DISTANCE; if (potentialSwipe) { var detectedDir = null; if (Math.abs(dx) > Math.abs(dy)) { detectedDir = dx > 0 ? 'right' : 'left'; } else { detectedDir = dy > 0 ? 'down' : 'up'; } var swipeBoundingBox = { x: Math.min(swipeStart.x, swipeEndX), y: Math.min(swipeStart.y, swipeEndY), width: Math.abs(dx), height: Math.abs(dy) }; var notesHitThisSwipe = []; for (var i_swipe = 0; i_swipe < notes.length; i_swipe++) { var n_swipe = notes[i_swipe]; if (n_swipe.judged || n_swipe.noteType !== 'swipe' || n_swipe.alpha === 0) { continue; } var overallSwipeTimeMatchesNote = false; if (n_swipe.targetHitTime >= swipeStart.time - hitWindowGood && n_swipe.targetHitTime <= swipeEndTime + hitWindowGood) { overallSwipeTimeMatchesNote = true; } if (!overallSwipeTimeMatchesNote) { if (swipeStart.time >= n_swipe.targetHitTime - hitWindowGood && swipeStart.time <= n_swipe.targetHitTime + hitWindowGood || swipeEndTime >= n_swipe.targetHitTime - hitWindowGood && swipeEndTime <= n_swipe.targetHitTime + hitWindowGood) { overallSwipeTimeMatchesNote = true; } } if (!overallSwipeTimeMatchesNote) { continue; } var noteCurrentWidth_swipe = n_swipe.noteAsset ? n_swipe.noteAsset.width : SWIPE_NOTE_WIDTH; var noteCurrentHeight_swipe = n_swipe.noteAsset ? n_swipe.noteAsset.height : SWIPE_NOTE_WIDTH; var noteBoundingBox_swipe = { x: n_swipe.x - noteCurrentWidth_swipe / 2, y: n_swipe.y - noteCurrentHeight_swipe / 2, width: noteCurrentWidth_swipe, height: noteCurrentHeight_swipe }; if (rectsIntersect(swipeBoundingBox, noteBoundingBox_swipe)) { if (detectedDir === n_swipe.swipeDir) { var verticalProximity = Math.abs(n_swipe.y - n_swipe.centerY); var verticalTolerance = noteCurrentHeight_swipe / 1.5; if (verticalProximity < verticalTolerance) { notesHitThisSwipe.push(n_swipe); } } } } if (notesHitThisSwipe.length > 0) { notesHitThisSwipe.sort(function (a, b) { var da = Math.abs(swipeEndTime - a.targetHitTime); var db = Math.abs(swipeEndTime - b.targetHitTime); return da - db; }); var maxNotesToHitPerSwipe = 1; var notesActuallyHitCount = 0; for (var k_swipe = 0; k_swipe < notesHitThisSwipe.length && notesActuallyHitCount < maxNotesToHitPerSwipe; k_swipe++) { var noteToJudge_swipe = notesHitThisSwipe[k_swipe]; if (noteToJudge_swipe.judged) { continue; } var result_swipe = noteToJudge_swipe.getHitAccuracy(); noteToJudge_swipe.judged = true; noteToJudge_swipe.showHitFeedback(result_swipe); if (noteToJudge_swipe.noteColumnIndex !== undefined) { flashColumn(noteToJudge_swipe.noteColumnIndex); } if (result_swipe !== 'miss') { addScore(result_swipe); addCombo(); if (!isTutorialMode && !gameOverFlag) { if (result_swipe === 'perfect') { bossCurrentHP = Math.max(0, bossCurrentHP - 2); } else if (result_swipe === 'good') { bossCurrentHP = Math.max(0, bossCurrentHP - 1); } updateBossHpDisplay(); } } else if (!isTutorialMode && !isShieldActive) { resetCombo(); } notesActuallyHitCount++; } } } inputLocked = true; LK.setTimeout(function () { inputLocked = false; }, 80); swipeStart = null; } }; game.update = function () { var now = Date.now(); if (typeof notes === 'undefined' || !Array.isArray(notes)) { notes = []; } if (isFinalBossActive && !isMidCutsceneActive) { var elapsedTime = now - gameStartTime; while (nextSpecialEventIdx < finalBossEventList.length) { var event = finalBossEventList[nextSpecialEventIdx]; if (elapsedTime >= event.time) { if (event.type === 'start_mid_cutscene') { isMidCutsceneActive = true; clearAllHelpers(); clearAmbientParticles(); fadeGameplay('out', function () { showMidBattleCutscene(function () { if (gameplayBackground && gameplayBackground.parent) { gameplayBackground.destroy(); } gameplayBackground = LK.getAsset('finalBossBgAsset_Phase2', { x: 0, y: 0, width: gameScreenWidth, height: gameScreenHeight, alpha: 0 }); game.addChildAt(gameplayBackground, 0); fadeGameplay('in'); }); }); } else if (event.type === 'helper_appear') { (function (e) { var helperInstance = showHelperBoss(e.bossId, e.text, e.targetColumn); if (e.buffType === 'shield') { isShieldActive = true; shieldEndTime = now + e.duration; if (shieldTimerDisplayContainer) { shieldTimerDisplayContainer.visible = true; } LK.setTimeout(function () { hideHelperBoss(helperInstance); }, e.duration); } else if (e.buffType === 'autoplay') { autoplayColumns[e.targetColumn] = true; LK.setTimeout(function () { autoplayColumns[e.targetColumn] = false; hideHelperBoss(helperInstance); }, e.duration); } else if (e.buffType === 'heal_over_time') { isHealOverTimeActive = true; healOverTimeEndTime = now + e.duration; lastHealTickTime = now; LK.setTimeout(function () { hideHelperBoss(helperInstance); }, e.duration); } })(event); } nextSpecialEventIdx++; } else { break; } } } if (isHealOverTimeActive) { if (now >= lastHealTickTime + healTickInterval) { playerCurrentHP = Math.min(playerMaxHP, playerCurrentHP + healAmountPerTick); updatePlayerHpDisplay(); lastHealTickTime = now; } if (now >= healOverTimeEndTime) { isHealOverTimeActive = false; } } if (currentScreenState === 'miniGameActive' && !isMiniGameOver) { miniGameTimeActive += 16; if (miniGameTimeActive >= MINI_GAME_SPEED_INCREASE_INTERVAL) { currentMiniGameObjectSpeed += MINI_GAME_SPEED_INCREMENT; miniGameTimeActive = 0; } if (miniGamePlayer && miniGamePlayer.asset && typeof miniGamePlayer.asset.update === 'function') { miniGamePlayer.asset.update(); } for (var i = 0; i < miniGameObstacles.length; i++) { var obs = miniGameObstacles[i]; if (obs && obs.asset && typeof obs.asset.update === 'function') { obs.asset.update(); } } spawnMiniGameObstacle(); moveMiniGameObstacles(); checkMiniGameCollisions(); updateMiniGameScoreDisplay(); } else if (currentScreenState === 'miniGameActive' && isMiniGameOver) { if (miniGameScreenElements.find(function (el) { return el.isGameOverText; }) === undefined) { var gameOverText = new Text2("GAME OVER", { size: 100, fill: 0xFF0000, align: 'center' }); gameOverText.anchor.set(0.5, 0.5); gameOverText.x = miniGameViewport.x + miniGameViewport.width / 2; gameOverText.y = miniGameViewport.y + miniGameViewport.height / 2; gameOverText.isGameOverText = true; game.addChild(gameOverText); miniGameScreenElements.push(gameOverText); } } else if (currentScreenState === 'gameplay' || currentScreenState === 'endlessLoopActive') { if (isMidCutsceneActive) { return; } if (currentScreenState === 'endlessLoopActive') { if (endlessTimerTxt && endlessStartTime > 0) { var elapsedTime = now - endlessStartTime; endlessTimerTxt.setText("Time: " + formatTime(elapsedTime)); } if (noteStreamStarted === false && now >= gameStartTime + 10000) { noteStreamStarted = true; lastNoteGenerationTime = now; } if (noteStreamStarted && (currentActiveRhythmMap.length - nextNoteIdx < 40 || now - lastNoteGenerationTime > 6000)) { lastNoteGenerationTime = now; var generatedChunk = generateProceduralRhythmMap(8.0, currentEndlessDifficulty, 120); var absoluteNotes = generatedChunk.map.map(function (note) { note.time += endlessTimelineOffsetMs; return note; }); if (absoluteNotes.length > 0) { var lastTime = 0; for (var i = 0; i < absoluteNotes.length; i++) { if (absoluteNotes[i].time > lastTime) { lastTime = absoluteNotes[i].time; } } endlessTimelineOffsetMs = lastTime; } currentActiveRhythmMap = currentActiveRhythmMap.concat(absoluteNotes); } if (!gameOverFlag && activeMusicTrack && activeMusicTrack.playing && now >= currentSongEndTime) { advanceEndlessMusicPhase(); } if (currentEndlessDifficulty < MAX_ENDLESS_DIFFICULTY) { currentEndlessDifficulty += ENDLESS_DIFFICULTY_INCREASE_RATE * (16 / 1000); } } if (!isTutorialMode) { if (isShieldActive) { if (playerShieldAnimation) { playerShieldAnimation.visible = true; playerShieldAnimation.update(); } if (now > shieldEndTime) { isShieldActive = false; if (shieldTimerDisplayContainer) { shieldTimerDisplayContainer.visible = false; } if (playerShieldAnimation) { playerShieldAnimation.visible = false; } } else { if (shieldTimerDisplayContainer && shieldTimerDisplayContainer.visible) { var remainingSecondsShield = (shieldEndTime - now) / 1000; if (shieldTimerTextDisplay) { shieldTimerTextDisplay.setText(remainingSecondsShield.toFixed(1) + "s"); } } } } else { if (shieldTimerDisplayContainer && shieldTimerDisplayContainer.visible) { shieldTimerDisplayContainer.visible = false; } if (playerShieldAnimation && playerShieldAnimation.visible) { playerShieldAnimation.visible = false; } } if (isPrecisionBuffActive) { if (now > precisionBuffEndTime) { isPrecisionBuffActive = false; hitWindowPerfect = originalHitWindowPerfect; hitWindowGood = originalHitWindowGood; if (precisionBuffTimerDisplayContainer) { precisionBuffTimerDisplayContainer.visible = false; } if (staticHitFrame) { tween(staticHitFrame, { height: STATIC_HIT_FRAME_HEIGHT }, { duration: 250, easing: tween.easeInQuad }); } } else { if (precisionBuffTimerDisplayContainer && precisionBuffTimerDisplayContainer.visible) { var remainingSecondsBuff = (precisionBuffEndTime - now) / 1000; if (precisionBuffTimerTextDisplay) { precisionBuffTimerTextDisplay.setText(remainingSecondsBuff.toFixed(1) + "s"); } } } } else { if (precisionBuffTimerDisplayContainer && precisionBuffTimerDisplayContainer.visible) { precisionBuffTimerDisplayContainer.visible = false; } } } var baseSparksPerSecond = 5; var bonusSparksPer5Combo = 2; var totalSparksPerSecond = baseSparksPerSecond + Math.floor(combo / 5) * bonusSparksPer5Combo; ambientSpawnEnergy += totalSparksPerSecond / 60.0; while (ambientSpawnEnergy >= 1) { if (ambientParticles.length >= MAX_AMBIENT_PARTICLES - 1) { break; } var spawnColumn = Math.floor(Math.random() * NUM_COLUMNS); createAmbientParticle(spawnColumn, 'up'); createAmbientParticle(spawnColumn, 'down'); ambientSpawnEnergy -= 1; } spawnNotes(); for (var i_update_notes = 0; i_update_notes < notes.length; i_update_notes++) { if (notes[i_update_notes] && notes[i_update_notes].update) { notes[i_update_notes].update(); } } removeOldNotes(); if (isTutorialMode) { var TUTORIAL_APPROX_DURATION_MS = 95000; var noNotesLeftOnScreen = notes.length === 0; var allNotesProcessed = nextNoteIdx >= (currentActiveRhythmMap ? currentActiveRhythmMap.length : 0); if (allNotesProcessed && noNotesLeftOnScreen && now - gameStartTime > TUTORIAL_APPROX_DURATION_MS) { exitTutorialGameplay(); return; } } else { checkGameEnd(); } } else { if (notes.length > 0) { for (var i_notes_clear = notes.length - 1; i_notes_clear >= 0; i_notes_clear--) { var n_clear = notes[i_notes_clear]; if (n_clear && n_clear.parent) { n_clear.destroy(); } } notes = []; } if (staticHitFrame && staticHitFrame.visible) { staticHitFrame.visible = false; } if (staticPerfectLine && staticPerfectLine.visible) { staticPerfectLine.visible = false; } } updateAmbientParticles(); }; // Load the specific song for testing showStartScreen();
===================================================================
--- original.js
+++ change.js
@@ -540,16 +540,18 @@
if (self.alpha > 0) {
self.alpha = 0;
}
if (self.noteColumnIndex !== undefined) {
- var overlay = columnFlashOverlays[self.noteColumnIndex];
- if (overlay) {
- tween(overlay, {
- alpha: 0
- }, {
- duration: 150,
- easing: tween.easeOutQuad
- });
+ if (!isFinalBossActive) {
+ var overlay = columnFlashOverlays[self.noteColumnIndex];
+ if (overlay) {
+ tween(overlay, {
+ alpha: 0
+ }, {
+ duration: 150,
+ easing: tween.easeOutQuad
+ });
+ }
}
}
return;
}
@@ -574,16 +576,18 @@
if (self.alpha > 0) {
self.alpha = 0;
}
if (self.noteColumnIndex !== undefined) {
- var overlay = columnFlashOverlays[self.noteColumnIndex];
- if (overlay) {
- tween(overlay, {
- alpha: 0
- }, {
- duration: 150,
- easing: tween.easeOutQuad
- });
+ if (!isFinalBossActive) {
+ var overlay = columnFlashOverlays[self.noteColumnIndex];
+ if (overlay) {
+ tween(overlay, {
+ alpha: 0
+ }, {
+ duration: 150,
+ easing: tween.easeOutQuad
+ });
+ }
}
}
};
return self;
@@ -684,14 +688,14 @@
/****
* Game Code
****/
-// Placeholder strzałki
-// np. węższa środkowa
-// Pomarańczowa główka
-// Złoty segment ogona (wysokość bazowa)
-// np. pomarańczowy/żółty box
// np. fioletowy box
+// np. pomarańczowy/żółty box
+// Złoty segment ogona (wysokość bazowa)
+// Pomarańczowa główka
+// np. węższa środkowa
+// Placeholder strzałki
1;
function _typeof6(o) {
"@babel/helpers - typeof";
return _typeof6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
@@ -983,9 +987,9 @@
var isMiniGameOver = false;
var currentMiniGameMusicTrack = null;
var ambientParticles = [];
var ambientSpawnEnergy = 0;
-var MAX_AMBIENT_PARTICLES = 100;
+var MAX_AMBIENT_PARTICLES = 80;
var AMBIENT_PARTICLE_ASSETS = ['ambient_particle_col0', 'ambient_particle_col1', 'ambient_particle_col2'];
var startScreenElements = [];
var pressStartBlinkInterval = null;
var PLAYER_HP_BAR_X = 1020;
@@ -1274,8 +1278,34 @@
columnFlashOverlays[i].alpha = 0;
}
}
}
+function fadeInGameplayElements(duration) {
+ var fadeInDuration = duration || 1500;
+ var elementsToFade = [playerHUD, bossHUD, staticHitFrame, staticPerfectLine, scoreTxt, comboTxt];
+ elementsToFade.forEach(function (el) {
+ if (el) {
+ el.visible = true;
+ el.alpha = 0;
+ var finalAlpha = 1.0;
+ if (el === comboTxt) {
+ finalAlpha = 0.5;
+ }
+ if (el === staticHitFrame) {
+ finalAlpha = 0.7;
+ }
+ if (el === staticPerfectLine) {
+ finalAlpha = 0.9;
+ }
+ tween(el, {
+ alpha: finalAlpha
+ }, {
+ duration: fadeInDuration,
+ easing: tween.easeOutQuad
+ });
+ }
+ });
+}
var allParticleAssetKeys = [];
for (var i = 1; i <= 12; i++) {
allParticleAssetKeys.push('particle' + i);
}
@@ -1996,10 +2026,9 @@
creditsGraphic.visible = false;
}
};
mainMenuContainer.addChild(rewindButtonMainMenu);
- var actualDefeatedCount = getNumberOfDefeatedBosses();
- var allStandardBossesDefeated = allBossData.length > 0 && actualDefeatedCount === allBossData.length;
+ var allStandardBossesDefeated = true;
var specialBossButtonAssetKey = allStandardBossesDefeated ? 'specialboss_unlocked' : 'specialboss_locked';
var specialBossButtonMainMenu = LK.getAsset(specialBossButtonAssetKey, {});
specialBossButtonMainMenu.width = 250;
var originalAssetWidthForRatioSB = 300;
@@ -2700,10 +2729,9 @@
showMainMenu();
};
game.addChild(rewindButton);
screenElements.push(rewindButton);
- var actualDefeatedCount = getNumberOfDefeatedBosses();
- var allStandardBossesDefeated = allBossData.length > 0 && actualDefeatedCount === allBossData.length;
+ var allStandardBossesDefeated = true;
var specialBossButtonAssetKey = allStandardBossesDefeated ? 'specialboss_unlocked' : 'specialboss_locked';
var specialBossButton = LK.getAsset(specialBossButtonAssetKey, {});
specialBossButton.width = 250;
var originalAssetWidthForRatioSB = 300;
@@ -6631,18 +6659,8 @@
type: 'swipe',
columnIndex: 1,
swipeDir: 'up'
}, {
- time: 149669,
- type: 'swipe',
- columnIndex: 0,
- swipeDir: 'down'
-}, {
- time: 149955,
- type: 'swipe',
- columnIndex: 1,
- swipeDir: 'up'
-}, {
time: 210000,
type: 'swipe',
columnIndex: 2,
swipeDir: 'up'
@@ -7018,33 +7036,29 @@
columnIndex: 0
}, {
time: 237718,
type: 'swipe',
- columnIndex: 0,
+ columnIndex: 1,
swipeDir: 'down'
}, {
time: 238076,
type: 'tap',
columnIndex: 0
}, {
time: 238433,
type: 'swipe',
- columnIndex: 0,
+ columnIndex: 1,
swipeDir: 'up'
}, {
time: 238782,
type: 'tap',
columnIndex: 0
}, {
time: 239102,
type: 'swipe',
- columnIndex: 0,
+ columnIndex: 1,
swipeDir: 'down'
}, {
- time: 239470,
- type: 'tap',
- columnIndex: 0
-}, {
time: 239807,
type: 'swipe',
columnIndex: 0,
swipeDir: 'up'
@@ -14352,14 +14366,8 @@
height: gameScreenHeight,
alpha: 0.8
});
game.addChildAt(gameplayBackground, 0);
- if (staticHitFrame) {
- staticHitFrame.visible = true;
- }
- if (staticPerfectLine) {
- staticPerfectLine.visible = true;
- }
if (gameUIContainer) {
gameUIContainer.visible = true;
}
if (isTutorialMode) {
@@ -14368,15 +14376,8 @@
}
if (comboTxt) {
comboTxt.visible = false;
}
- } else {
- if (scoreTxt) {
- scoreTxt.visible = true;
- }
- if (comboTxt) {
- comboTxt.visible = true;
- }
}
hpBarsInitialized = false;
nextNoteIdx = 0;
if (currentBossSprite && currentBossSprite.parent) {
@@ -14398,23 +14399,16 @@
loop: false
});
currentScreenState = 'gameplay';
if (!isTutorialMode) {
- playerHUD.visible = true;
- bossHUD.visible = true;
- tween(playerHUD, {
- alpha: 1
- }, {
- duration: 500
- });
- tween(bossHUD, {
- alpha: 1
- }, {
- duration: 500
- });
+ fadeInGameplayElements(1500);
} else {
- playerHUD.visible = false;
- bossHUD.visible = false;
+ if (staticHitFrame) {
+ staticHitFrame.visible = true;
+ }
+ if (staticPerfectLine) {
+ staticPerfectLine.visible = true;
+ }
}
}
function setupPowerUpDisplay() {
var smallIconSize = 110;
@@ -14882,9 +14876,14 @@
function showBossIntroAnimation(bossId) {
if (!bossId) {
return;
}
- var graphicAssetKey = 'boss_intro_graphic_' + bossId;
+ var graphicAssetKey;
+ if (bossId === "FinalBoss") {
+ graphicAssetKey = 'boss_intro_graphic_final';
+ } else {
+ graphicAssetKey = 'boss_intro_graphic_' + bossId;
+ }
var introGraphic = LK.getAsset(graphicAssetKey, {
anchorX: 0.5,
anchorY: 0.5,
scale: {
@@ -15101,26 +15100,12 @@
gameUIContainer.visible = true;
}
createPlayerHUD();
createBossHUD();
- playerHUD.visible = true;
- bossHUD.visible = true;
- playerHUD.alpha = 1;
- bossHUD.alpha = 1;
setupGameplayElements();
- if (staticHitFrame) {
- staticHitFrame.visible = true;
- }
- if (staticPerfectLine) {
- staticPerfectLine.visible = true;
- }
- if (scoreTxt) {
- scoreTxt.visible = true;
- }
- if (comboTxt) {
- comboTxt.visible = true;
- }
+ fadeInGameplayElements(1500);
currentFightingBossId = "FinalBoss";
+ showBossIntroAnimation(currentFightingBossId);
currentActiveRhythmMap = processRawRhythmMap(songData.rawRhythmMap, "FinalBossTrack");
gameStartTime = Date.now();
LK.playMusic(songData.musicAsset, {
loop: false
@@ -15177,23 +15162,23 @@
slides: [{
asset: 'mid_cutscene_slide_3',
x: gameScreenWidth * 0.75,
y: gameScreenHeight * 0.25,
- startScale: 0.3,
- endScale: 0.4,
+ startScale: 0.4,
+ endScale: 0.7,
duration: 8000
}, {
asset: 'mid_cutscene_slide_4',
x: gameScreenWidth * 0.25,
y: gameScreenHeight * 0.75,
- startScale: 0.5,
- endScale: 0.6,
+ startScale: 0.4,
+ endScale: 0.7,
duration: 10000
}, {
asset: 'mid_cutscene_slide_5',
x: gameScreenWidth * 0.5,
y: gameScreenHeight * 0.5,
- startScale: 0.7,
+ startScale: 0.4,
endScale: 0.8,
duration: 8000
}]
}, {
@@ -15201,55 +15186,71 @@
asset: 'mid_cutscene_slide_6',
duration: 1500
}, {
type: 'multi_sequential_zoom',
- inter_delay: 2500,
- final_wait: 4000,
+ inter_delay: 2200,
+ final_wait: 7000,
slides: [{
asset: 'mid_cutscene_slide_7',
duration: 11000,
startScale: 0.4,
- endScale: 1.0
+ endScale: 1.0,
+ x: gameScreenWidth * 0.25,
+ y: gameScreenHeight * 0.20
}, {
asset: 'mid_cutscene_slide_8',
duration: 11000,
startScale: 0.4,
- endScale: 1.0
+ endScale: 1.0,
+ x: gameScreenWidth * 0.75,
+ y: gameScreenHeight * 0.20
}, {
asset: 'mid_cutscene_slide_9',
duration: 11000,
startScale: 0.4,
- endScale: 1.0
+ endScale: 1.0,
+ x: gameScreenWidth * 0.25,
+ y: gameScreenHeight * 0.40
}, {
asset: 'mid_cutscene_slide_10',
duration: 11000,
startScale: 0.4,
- endScale: 1.0
+ endScale: 1.0,
+ x: gameScreenWidth * 0.75,
+ y: gameScreenHeight * 0.40
}, {
asset: 'mid_cutscene_slide_11',
duration: 11000,
startScale: 0.4,
- endScale: 1.0
+ endScale: 1.0,
+ x: gameScreenWidth * 0.25,
+ y: gameScreenHeight * 0.60
}, {
asset: 'mid_cutscene_slide_12',
duration: 11000,
startScale: 0.4,
- endScale: 1.0
+ endScale: 1.0,
+ x: gameScreenWidth * 0.75,
+ y: gameScreenHeight * 0.60
}, {
asset: 'mid_cutscene_slide_13',
duration: 11000,
startScale: 0.4,
- endScale: 1.0
+ endScale: 1.0,
+ x: gameScreenWidth * 0.25,
+ y: gameScreenHeight * 0.80
}, {
asset: 'mid_cutscene_slide_14',
duration: 11000,
startScale: 0.4,
- endScale: 1.0
+ endScale: 1.0,
+ x: gameScreenWidth * 0.75,
+ y: gameScreenHeight * 0.80
}]
}, {
type: 'fullscreen',
asset: 'mid_cutscene_slide_15',
- duration: 3000
+ duration: 4000
}, {
type: 'fullscreen',
asset: 'mid_cutscene_slide_16',
duration: 3000
@@ -15364,14 +15365,8 @@
});
activeSlides.push(slide);
cutsceneElements.push(slide);
fadeInSlide(slide, function () {
- tween(slide, {
- alpha: 0
- }, {
- duration: slideData.duration,
- easing: tween.easeInQuad
- });
tween(slide.scale, {
x: slideData.endScale,
y: slideData.endScale
}, {
@@ -15732,10 +15727,10 @@
y: y,
time: Date.now()
};
var now = Date.now();
- for (var i_gp_pu = activePowerUpItems.length - 1; i_gp_pu >= 0; i_gp_pu--) {
- var pItem_gp = activePowerUpItems[i_gp_pu];
+ for (var i_gp_pu = activeHelperBosses.length - 1; i_gp_pu >= 0; i_gp_pu--) {
+ var pItem_gp = activeHelperBosses[i_gp_pu];
if (pItem_gp && !pItem_gp.collected && pItem_gp.visualAsset && pItem_gp.parent) {
var pWidth_gp = pItem_gp.visualAsset.width * pItem_gp.scale.x;
var pHeight_gp = pItem_gp.visualAsset.height * pItem_gp.scale.y;
if (x >= pItem_gp.x - pWidth_gp / 2 && x <= pItem_gp.x + pWidth_gp / 2 && y >= pItem_gp.y - pHeight_gp / 2 && y <= pItem_gp.y + pHeight_gp / 2) {
@@ -15782,16 +15777,17 @@
var result = noteUnderCursor.getHitAccuracy();
noteUnderCursor.hit = true;
if (noteUnderCursor.isHoldNote) {
if (result !== 'miss') {
- console.log("HOLD PRESSED: noteType=" + noteUnderCursor.noteType + ", y=" + noteUnderCursor.y.toFixed(2) + ", noteAsset.y=" + (noteUnderCursor.noteAsset ? noteUnderCursor.noteAsset.y.toFixed(2) : "N/A") + ", centerY=" + noteUnderCursor.centerY + ", now=" + now + ", targetHitTime=" + noteUnderCursor.targetHitTime + ", diffToTarget=" + (noteUnderCursor.targetHitTime - now) + ", result=" + result);
noteUnderCursor.isBeingHeld = true;
noteUnderCursor.holdPressTime = now;
noteUnderCursor.showHitFeedback(result);
if (noteUnderCursor.noteColumnIndex !== undefined) {
- var overlay = columnFlashOverlays[noteUnderCursor.noteColumnIndex];
- if (overlay) {
- overlay.alpha = 0.5;
+ if (!isFinalBossActive) {
+ var overlay = columnFlashOverlays[noteUnderCursor.noteColumnIndex];
+ if (overlay) {
+ overlay.alpha = 0.5;
+ }
}
}
if (!isTutorialMode) {
addScore(result);
@@ -16226,10 +16222,10 @@
precisionBuffTimerDisplayContainer.visible = false;
}
}
}
- var baseSparksPerSecond = 2;
- var bonusSparksPer5Combo = 6;
+ var baseSparksPerSecond = 5;
+ var bonusSparksPer5Combo = 2;
var totalSparksPerSecond = baseSparksPerSecond + Math.floor(combo / 5) * bonusSparksPer5Combo;
ambientSpawnEnergy += totalSparksPerSecond / 60.0;
while (ambientSpawnEnergy >= 1) {
if (ambientParticles.length >= MAX_AMBIENT_PARTICLES - 1) {