Skip to content

Commit

Permalink
chore: lose hype on leave + adjust hype meter
Browse files Browse the repository at this point in the history
  • Loading branch information
neolectron committed Jul 31, 2023
1 parent 29ec708 commit 10eccf1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/hud/HypeGauge/HypeGauge.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { clamp } from 'three/src/math/MathUtils';
import './hypegauge.css';

const hypeToDegree = (hype: number) => clamp(hype * 0.3 - 230, -220, 40);
const hypeToDegree = (hype: number) => clamp(hype / 8 - 230, -220, 40);

type Props = {
hype: number;
Expand Down
4 changes: 4 additions & 0 deletions src/machines/game.machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ export const gameMachine = createMachine({
persons: context.persons.filter(
(actor) => actor.id !== person.id,
),
meters: {
...context.meters,
hype: context.meters.hype - 400,
},
};
}),
],
Expand Down

0 comments on commit 10eccf1

Please sign in to comment.