mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-16 06:06:11 +01:00
canvas
This commit is contained in:
1 parent
960ca4b0f4
commit
4247004b13
20 files changed
+279
-251
No files matched your search
+1
-1
@@ -2,7 +2,7 @@ import { api } from "../api/dynamic";
|
||||
import { Tankopedia } from "../stores/tankopedia";
|
||||
import { useAwait } from "./useAwait";
|
||||
|
||||
export function useProtagonist() {
|
||||
export function useProtagonistTank() {
|
||||
const id = Tankopedia.use((state) => state.protagonist.tank);
|
||||
const tank = useAwait(() => api.tank(id), `tank-${id}`);
|
||||
return tank;
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Tankopedia } from "../stores/tankopedia";
|
||||
import { useProtagonist } from "./useProtagonist";
|
||||
import { useProtagonistTank } from "./useProtagonistTank";
|
||||
|
||||
export function useProtagonistTurret() {
|
||||
const id = Tankopedia.use((state) => state.protagonist.gun);
|
||||
const tank = useProtagonist();
|
||||
const tank = useProtagonistTank();
|
||||
return tank.turrets[id];
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
import { Tankopedia } from "../stores/tankopedia";
|
||||
|
||||
export function useTankModelDefinition() {
|
||||
return Tankopedia.use((state) => state.model);
|
||||
}
|
||||
Reference in new issue
Block a user