import { observer } from "mobx-react-lite"; import type { RuntimeGameObjectInstance } from "../types"; import { state } from "../state"; import { ObjectViewInternal } from "./ObjectViewInternal"; import { PlayerObjectView } from "./CharacterView"; export type GameObjectViewProps = { object: RuntimeGameObjectInstance; isPlayer: boolean; } export const GameObjectView = observer(function (props: GameObjectViewProps) { const objectType = state.world.getObjectTypeById(props.object.typeId); if (!objectType) return null; if (props.isPlayer) return ; function handleClick(): void { state.game?.emitEvent('object_clicked', { object: props.object }); } return ; });