Update documentation after refactoring: AGENTS.md, GAME_BRIEFING.md, skills.md
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m28s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m28s
- Updated AGENTS.md to include store/ directory and clarify store architecture - Updated GAME_BRIEFING.md Code Architecture section with store/ and legacy store info - Updated skills.md with skill state management information - Includes other refactoring changes (store hooks, component updates, etc.)
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useGameStore } from './gameStore';
|
||||
import { TICK_MS } from '../constants';
|
||||
|
||||
export function useGameLoop() {
|
||||
const tick = useGameStore((s) => s.tick);
|
||||
|
||||
return {
|
||||
start: () => {
|
||||
const interval = setInterval(tick, TICK_MS);
|
||||
return () => clearInterval(interval);
|
||||
},
|
||||
};
|
||||
useEffect(() => {
|
||||
const interval = setInterval(tick, TICK_MS);
|
||||
return () => clearInterval(interval);
|
||||
}, [tick]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user