mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-14 15:07:59 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e692454b96 | ||
|
|
71321e98dc | ||
|
|
c381b87c48 | ||
|
|
aa479e67bf |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "life-trinket",
|
||||
"private": true,
|
||||
"version": "0.9.7",
|
||||
"version": "0.9.5",
|
||||
"type": "commonjs",
|
||||
"engines": {
|
||||
"node": ">=18",
|
||||
|
||||
@@ -2,7 +2,6 @@ import { Checkbox } from '@mui/material';
|
||||
import { useRef } from 'react';
|
||||
import { twc } from 'react-twc';
|
||||
import { theme } from '../../Data/theme';
|
||||
import { useAnalytics } from '../../Hooks/useAnalytics';
|
||||
import { useGlobalSettings } from '../../Hooks/useGlobalSettings';
|
||||
import { usePlayers } from '../../Hooks/usePlayers';
|
||||
import { useSafeRotate } from '../../Hooks/useSafeRotate';
|
||||
@@ -18,8 +17,8 @@ import {
|
||||
ResetGame,
|
||||
} from '../../Icons/generated';
|
||||
import { Player, Rotation } from '../../Types/Player';
|
||||
import { PreStartMode } from '../../Types/Settings';
|
||||
import { RotationDivProps } from '../Buttons/CommanderDamage';
|
||||
import { useAnalytics } from '../../Hooks/useAnalytics';
|
||||
|
||||
const PlayerMenuWrapper = twc.div`
|
||||
flex
|
||||
@@ -113,7 +112,6 @@ const PlayerMenu = ({
|
||||
setRandomizingPlayer,
|
||||
saveCurrentGame,
|
||||
initialGameSettings,
|
||||
setPreStartCompleted,
|
||||
} = useGlobalSettings();
|
||||
|
||||
const analytics = useAnalytics();
|
||||
@@ -135,14 +133,8 @@ const PlayerMenu = ({
|
||||
const handleResetGame = () => {
|
||||
resetCurrentGame();
|
||||
setShowPlayerMenu(false);
|
||||
|
||||
setPlaying(false);
|
||||
|
||||
if (settings.preStartMode === PreStartMode.RandomKing) {
|
||||
setRandomizingPlayer(true);
|
||||
setPreStartCompleted(false);
|
||||
}
|
||||
|
||||
analytics.trackEvent('reset_game');
|
||||
};
|
||||
|
||||
|
||||
@@ -14,10 +14,6 @@ const getOrientation = () => {
|
||||
: 'landscape';
|
||||
};
|
||||
|
||||
const ANIMATION_INTRO_LENGTH = 500;
|
||||
|
||||
const BEFORE_INTRO_TIMER_LENGTH = 100;
|
||||
|
||||
export const FingerGame = () => {
|
||||
const { players } = usePlayers();
|
||||
|
||||
@@ -38,7 +34,7 @@ export const FingerGame = () => {
|
||||
aboutToStartTimerRef.current = setTimeout(() => {
|
||||
setSelectedTouchPoint(undefined);
|
||||
setPlaying(true);
|
||||
}, ANIMATION_INTRO_LENGTH);
|
||||
}, 500);
|
||||
|
||||
setTimerStarted(true);
|
||||
return;
|
||||
@@ -50,7 +46,7 @@ export const FingerGame = () => {
|
||||
const randomIndex = Math.floor(Math.random() * touchPoints.length);
|
||||
const randomTouchPoint = touchPoints[randomIndex];
|
||||
setSelectedTouchPoint(randomTouchPoint);
|
||||
}, BEFORE_INTRO_TIMER_LENGTH);
|
||||
}, 250);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -103,7 +99,7 @@ export const FingerGame = () => {
|
||||
aboutToStartTimerRef.current = setTimeout(() => {
|
||||
setSelectedTouchPoint(undefined);
|
||||
setPlaying(true);
|
||||
}, ANIMATION_INTRO_LENGTH);
|
||||
}, 500);
|
||||
setTimerStarted(true);
|
||||
return;
|
||||
}
|
||||
@@ -184,7 +180,7 @@ export const FingerGame = () => {
|
||||
key={`touch-point-${index}`}
|
||||
data-is-selected={selectedTouchPoint?.id === point.id}
|
||||
data-unloading={timerStarted}
|
||||
className="absolute rounded-full translate-x-[-50%] translate-y-[-50%] transition-all duration-500
|
||||
className="absolute rounded-full translate-x-[-50%] translate-y-[-50%] transition-all duration-1000
|
||||
h-[75px] w-[75px]
|
||||
data-[unloading=false]:data-[is-selected=true]:h-[250px] data-[unloading=false]:data-[is-selected=true]:w-[250px]
|
||||
data-[unloading=true]:h-[0px] data-[unloading=true]:w-[0px] data-[unloading=true]:duration-[400ms]
|
||||
|
||||
@@ -8,7 +8,8 @@ const questions = [
|
||||
'Who has the most piercings?',
|
||||
'Who has the most expensive shoes?',
|
||||
'Who has the most most amount of teeth?',
|
||||
'Who has the least amount of teeth?',
|
||||
'Who has the most least amount of teeth?',
|
||||
'Who has the most least amount of teeth?',
|
||||
'Who lives closest to the equator?',
|
||||
'Who is the tallest person in the group?',
|
||||
'Who is the shortest person in the group?',
|
||||
|
||||
@@ -95,7 +95,6 @@ export const Play = () => {
|
||||
}, []);
|
||||
|
||||
if (
|
||||
players.length > 1 &&
|
||||
!preStartCompleted &&
|
||||
settings.preStartMode !== PreStartMode.None &&
|
||||
!playing &&
|
||||
|
||||
Reference in New Issue
Block a user