diff --git a/src/components/ResourceDisplay.tsx b/src/components/ResourceDisplay.tsx index c7c75a9..f4ffb42 100644 --- a/src/components/ResourceDisplay.tsx +++ b/src/components/ResourceDisplay.tsx @@ -1,12 +1,17 @@ -import { Box, HStack, Text } from '@chakra-ui/react' +import { Box, HStack, Text, Progress, VStack } from '@chakra-ui/react' import { useGameStore } from '../store/gameStore' export function ResourceDisplay() { - const { points, techParts, pointsPerSecond, techPartsPerSecond, clickPower, getTotalMultiplier, activeMultipliers } = useGameStore() + const { points, techParts, pointsPerSecond, techPartsPerSecond, clickPower, getTotalMultiplier, activeMultipliers, playerLevel } = useGameStore() const totalMultiplier = getTotalMultiplier() const actualClickPower = clickPower * totalMultiplier + // Calculate progress to next level + const currentLevelPPS = Math.pow(10, playerLevel - 1) + const nextLevelPPS = Math.pow(10, playerLevel) + const progress = ((pointsPerSecond - currentLevelPPS) / (nextLevelPPS - currentLevelPPS)) * 100 + return ( - - - Points - {Math.floor(points)} - +{pointsPerSecond}/s - Click Power: {actualClickPower} - {activeMultipliers.length > 0 && ( - {totalMultiplier}x Active - )} + + + + Points + {Math.floor(points)} + +{pointsPerSecond}/s + Click Power: {actualClickPower} + {activeMultipliers.length > 0 && ( + {totalMultiplier}x Active + )} + + + Tech Parts + {Math.floor(techParts)} + +{techPartsPerSecond}/s + + + + + Level {playerLevel} + Level {playerLevel + 1} + + - - Tech Parts - {Math.floor(techParts)} - +{techPartsPerSecond}/s - - + ) } \ No newline at end of file