point-click-components 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,11 +9,11 @@ import { Dispatch } from 'react';
9
9
  import { FunctionComponent } from 'react';
10
10
  import { GameData } from 'point-click-lib';
11
11
  import { GameDesign } from 'point-click-lib';
12
+ import { GameRuntimeOptions } from 'point-click-lib';
12
13
  import { HotspotZone } from 'point-click-lib';
13
14
  import { InGameEventReporter } from 'point-click-lib';
14
15
  import { LogToDebug } from 'point-click-lib';
15
16
  import { Order } from 'point-click-lib';
16
- import { PlaySound } from 'point-click-lib';
17
17
  import { Provider } from 'react';
18
18
  import { ReactElement } from 'react';
19
19
  import { ReactNode } from 'react';
@@ -83,6 +83,9 @@ export declare type GameAction = {
83
83
  } | {
84
84
  type: 'SET-PAUSED';
85
85
  isPaused: boolean;
86
+ } | {
87
+ type: 'SET-SOUND-DISABLED';
88
+ isSoundDisabled: boolean;
86
89
  } | {
87
90
  type: 'RESET';
88
91
  } | {
@@ -99,18 +102,18 @@ gameDesign: GameDesign;
99
102
  getImageAsset: GetImageAsset;
100
103
  getSoundAsset: GetSoundAsset;
101
104
  SoundHandler?: SoundPlayerComponent;
105
+ allowLocalSaves?: boolean;
102
106
  }>;
103
107
 
104
108
  export declare const GameRoom: FunctionComponent<Props_2>;
105
109
 
106
110
  export declare const GameRunner: ({ gameDesign, Layout, getImageAsset, getSoundAsset, SoundHandler, initialRoomSize, options }: Props_3) => JSX.Element;
107
111
 
108
- declare type GameRunnerOptions = {
112
+ declare type GameRunnerOptions = Partial<GameRuntimeOptions> & {
109
113
  eventReporter?: InGameEventReporter;
110
114
  debugLogger?: LogToDebug;
111
- playSound?: PlaySound;
112
- defaultTalkTime?: number;
113
- cellSize?: number;
115
+ allowLocalSaves?: boolean;
116
+ maxCameraMove?: number;
114
117
  };
115
118
 
116
119
  declare type GetImageAsset = {
@@ -337,10 +340,27 @@ uiState: UiState;
337
340
  dispatchUi: Dispatch<UiAction>;
338
341
  }>;
339
342
 
343
+ export declare const useCamera: (maxCameraMove?: number) => {
344
+ cameraPoint: {
345
+ x: number;
346
+ y: number;
347
+ };
348
+ updateCamera: (viewAngleX: number, viewAngleY: number, currentRoomId: string) => void;
349
+ isAtPoint: boolean;
350
+ };
351
+
340
352
  export declare const useCameraPoint: () => {
341
353
  cameraPoint?: XY;
342
354
  };
343
355
 
356
+ export declare const useLocalSavedGame: () => {
357
+ saveGame: (fileName?: string) => void;
358
+ loadGame: (fileName?: string) => void;
359
+ listSavedGames: () => string[];
360
+ deleteSave: (fileName: string) => void;
361
+ restart: () => void;
362
+ };
363
+
344
364
  export declare const useRoomRender: () => {
345
365
  roomData: {
346
366
  id: string;