angry-pixel 1.1.13 → 1.1.15

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.
Files changed (54) hide show
  1. package/lib/component/Animator.d.ts +33 -33
  2. package/lib/component/AudioPlayer.d.ts +59 -59
  3. package/lib/component/Button.d.ts +42 -42
  4. package/lib/component/Camera.d.ts +21 -21
  5. package/lib/component/RigidBody.d.ts +23 -23
  6. package/lib/component/Sprite.d.ts +22 -22
  7. package/lib/component/Transform.d.ts +30 -30
  8. package/lib/component/collider/BallCollider.d.ts +25 -25
  9. package/lib/component/collider/BoxCollider.d.ts +33 -33
  10. package/lib/component/collider/Collider.d.ts +35 -35
  11. package/lib/component/collider/EdgeCollider.d.ts +29 -29
  12. package/lib/component/collider/PolygonCollider.d.ts +40 -40
  13. package/lib/component/collider/TilemapCollider.d.ts +29 -29
  14. package/lib/component/rendering/MaskRenderer.d.ts +28 -28
  15. package/lib/component/rendering/SpriteRenderer.d.ts +44 -44
  16. package/lib/component/rendering/TextRenderer.d.ts +47 -47
  17. package/lib/component/rendering/TiledTilemapRenderer.d.ts +79 -79
  18. package/lib/component/rendering/TilemapRenderer.d.ts +55 -55
  19. package/lib/component/rendering/VideoRenderer.d.ts +69 -0
  20. package/lib/core/Component.d.ts +86 -86
  21. package/lib/core/Game.d.ts +44 -44
  22. package/lib/core/GameActor.d.ts +99 -99
  23. package/lib/core/GameConfig.d.ts +18 -18
  24. package/lib/core/GameObject.d.ts +133 -133
  25. package/lib/core/Scene.d.ts +13 -13
  26. package/lib/core/facades/AssetManagerFacade.d.ts +51 -41
  27. package/lib/core/facades/DomManagerFacade.d.ts +8 -8
  28. package/lib/core/facades/GameObjectManagerFacade.d.ts +70 -70
  29. package/lib/core/facades/InputManagerFacade.d.ts +13 -13
  30. package/lib/core/facades/SceneManagerFacade.d.ts +18 -18
  31. package/lib/core/facades/TimeManagerFacade.d.ts +11 -11
  32. package/lib/core/ioc/Config.d.ts +3 -3
  33. package/lib/core/managers/AssetManager.d.ts +33 -28
  34. package/lib/core/managers/DomManager.d.ts +9 -9
  35. package/lib/core/managers/GameObjectManager.d.ts +21 -21
  36. package/lib/core/managers/HeadlessIterationManager.d.ts +29 -29
  37. package/lib/core/managers/IterationManager.d.ts +56 -56
  38. package/lib/core/managers/SceneManager.d.ts +22 -22
  39. package/lib/core/managers/TimeManager.d.ts +24 -24
  40. package/lib/gameObject/GameCamera.d.ts +16 -16
  41. package/lib/gameObject/SpacePointer.d.ts +8 -8
  42. package/lib/index.cjs.js +1 -1
  43. package/lib/index.d.ts +39 -38
  44. package/lib/index.esm.js +1 -1
  45. package/lib/index.js +1 -1
  46. package/lib/input/GamepadController.d.ts +51 -63
  47. package/lib/input/InputManager.d.ts +12 -12
  48. package/lib/input/KeyboardController.d.ts +12 -12
  49. package/lib/input/MouseController.d.ts +21 -21
  50. package/lib/input/TouchController.d.ts +13 -13
  51. package/lib/utils/Container.d.ts +12 -12
  52. package/lib/utils/Exception.d.ts +4 -4
  53. package/lib/utils/UUID.d.ts +1 -1
  54. package/package.json +5 -5
@@ -1,18 +1,18 @@
1
- import { BroadPhaseMethods, CollisionMatrix, CollisionMethods } from "angry-pixel-2d-physics";
2
- import { Rectangle, Vector2 } from "angry-pixel-math";
3
- export interface GameConfig {
4
- containerNode?: HTMLElement | null;
5
- gameWidth?: number;
6
- gameHeight?: number;
7
- debugEnabled?: boolean;
8
- canvasColor?: string;
9
- physicsFramerate?: number;
10
- spriteDefaultScale?: Vector2 | null;
11
- headless?: boolean;
12
- collisions?: {
13
- collisionMethod?: CollisionMethods;
14
- collisionArea?: Rectangle;
15
- collisionMatrix?: CollisionMatrix;
16
- collisionBroadPhaseMethod?: BroadPhaseMethods;
17
- };
18
- }
1
+ import { BroadPhaseMethods, CollisionMatrix, CollisionMethods } from "angry-pixel-2d-physics";
2
+ import { Rectangle, Vector2 } from "angry-pixel-math";
3
+ export interface GameConfig {
4
+ containerNode?: HTMLElement | null;
5
+ gameWidth?: number;
6
+ gameHeight?: number;
7
+ debugEnabled?: boolean;
8
+ canvasColor?: string;
9
+ physicsFramerate?: number;
10
+ spriteDefaultScale?: Vector2 | null;
11
+ headless?: boolean;
12
+ collisions?: {
13
+ collisionMethod?: CollisionMethods;
14
+ collisionArea?: Rectangle;
15
+ collisionMatrix?: CollisionMatrix;
16
+ collisionBroadPhaseMethod?: BroadPhaseMethods;
17
+ };
18
+ }
@@ -1,133 +1,133 @@
1
- import { Component, ComponentClass } from "./Component";
2
- import { Transform } from "../component/Transform";
3
- import { RigidBody } from "../component/RigidBody";
4
- import { Scene } from "./Scene";
5
- import { GameActor, InitOptions } from "./GameActor";
6
- import { Container } from "../utils/Container";
7
- export declare const LAYER_DEFAULT = "Default";
8
- export type GameObjectClass<T extends GameObject = GameObject> = new (container: Container, name?: string, parent?: GameObject) => T;
9
- export declare class GameObject extends GameActor {
10
- readonly id: string;
11
- readonly name: string;
12
- tag: string;
13
- layer: string;
14
- ui: boolean;
15
- keep: boolean;
16
- private _parent;
17
- private _active;
18
- private components;
19
- private activeComponentsCache;
20
- private activeChildrenCache;
21
- constructor(container: Container, name?: string, parent?: GameObject);
22
- get active(): boolean;
23
- set active(active: boolean);
24
- get parent(): GameObject | null;
25
- set parent(parent: GameObject | null);
26
- private updateComponentsActiveStatus;
27
- private updateChildrenActiveStatus;
28
- get transform(): Transform;
29
- get rigidBody(): RigidBody;
30
- /**
31
- * This method is called when the active state changes.
32
- */
33
- protected onActiveChange(): void;
34
- /**
35
- * @returns The current loaded scene
36
- */
37
- protected getCurrentScene<T extends Scene>(): T;
38
- /**
39
- * Add a component to the game obejct
40
- * @param componentClass The class of the component
41
- * @returns The added component
42
- */
43
- addComponent<ComponentType extends Component = Component>(componentClass: ComponentClass<ComponentType>): ComponentType;
44
- /**
45
- * Add a component to the game obejct
46
- * @param componentClass The class of the component
47
- * @param options The options passed to the init method of the component
48
- * @returns The added component
49
- */
50
- addComponent<ComponentType extends Component = Component, OptionsType extends InitOptions = InitOptions>(componentClass: ComponentClass<ComponentType>, options: OptionsType): ComponentType;
51
- /**
52
- * Add a component to the game obejct
53
- * @param componentClass The class of the component
54
- * @param name The name of the component
55
- * @returns The added component
56
- */
57
- addComponent<ComponentType extends Component = Component>(componentClass: ComponentClass<ComponentType>, name: string): ComponentType;
58
- /**
59
- * Add a component to the game obejct
60
- * @param componentClass The class of the component
61
- * @param options The options passed to the init method of the component
62
- * @param name The name of the component
63
- * @returns The added component
64
- */
65
- addComponent<ComponentType extends Component = Component, OptionsType extends InitOptions = InitOptions>(componentClass: ComponentClass<ComponentType>, options: OptionsType, name: string): ComponentType;
66
- private checkMultipleComponent;
67
- /**
68
- * Returns all the components in the game object.
69
- * @returns The found components
70
- */
71
- getComponents(): Component[];
72
- /**
73
- * Returns all the components for the given class in the game object.
74
- * @param componentClass The class of the components
75
- * @returns The found components
76
- */
77
- getComponents<T extends Component>(componentClass: ComponentClass<T>): T[];
78
- /**
79
- * Returns the first component found for the given class, or undefined otherwise.
80
- * @param componentClass The class of the component
81
- * @returns The found component
82
- */
83
- getComponent<T extends Component>(componentClass: ComponentClass<T>): T;
84
- /**
85
- * Returns the first component found for the given name, or undefined otherwise.
86
- * @param name The name of the component
87
- * @returns The found component
88
- */
89
- getComponent<T extends Component>(name: string): T;
90
- /**
91
- * Returns TRUE if the game object has a component for the given class, or FALSE otherwise
92
- * @param componentClass The class of the component to find
93
- * @returns boolean
94
- */
95
- hasComponent<T extends Component>(componentClass: ComponentClass<T>): boolean;
96
- /**
97
- * @param name The name of the component to find
98
- * @returns boolean
99
- */
100
- hasComponent(name: string): boolean;
101
- removeComponent(component: Component): void;
102
- /**
103
- * Add a child game object.
104
- * @param gameObjectClass The class of the child game object
105
- * @param options [optional] This options will be passed to the init method
106
- * @param name [optional] The name of the game object
107
- * @returns The added child game object
108
- */
109
- addChild<T extends GameObject>(gameObjectClass: GameObjectClass<T>, options?: InitOptions, name?: string): T;
110
- /**
111
- * @returns The children game objects
112
- */
113
- getChildren<T extends GameObject>(): T[];
114
- /**
115
- * Returns the first child found for the given class, or undefined otherwise.
116
- * @param gameObjectClass The class of the child game object to find
117
- * @returns The found child game object
118
- */
119
- getChild<T extends GameObject>(gameObjectClass: GameObjectClass<T>): T;
120
- /**
121
- * Returns the first child found for the given name, or undefined otherwise.
122
- * @param name The name of the child game object to find
123
- * @returns The found child game object
124
- */
125
- getChild<T extends GameObject>(name: string): T;
126
- /**
127
- * Destroy all the children game objects
128
- */
129
- destroyChildren(): void;
130
- protected _destroy(): void;
131
- private destroyComponents;
132
- protected _stopGame(): void;
133
- }
1
+ import { Component, ComponentClass } from "./Component";
2
+ import { Transform } from "../component/Transform";
3
+ import { RigidBody } from "../component/RigidBody";
4
+ import { Scene } from "./Scene";
5
+ import { GameActor, InitOptions } from "./GameActor";
6
+ import { Container } from "../utils/Container";
7
+ export declare const LAYER_DEFAULT = "Default";
8
+ export type GameObjectClass<T extends GameObject = GameObject> = new (container: Container, name?: string, parent?: GameObject) => T;
9
+ export declare class GameObject extends GameActor {
10
+ readonly id: string;
11
+ readonly name: string;
12
+ tag: string;
13
+ layer: string;
14
+ ui: boolean;
15
+ keep: boolean;
16
+ private _parent;
17
+ private _active;
18
+ private components;
19
+ private activeComponentsCache;
20
+ private activeChildrenCache;
21
+ constructor(container: Container, name?: string, parent?: GameObject);
22
+ get active(): boolean;
23
+ set active(active: boolean);
24
+ get parent(): GameObject | null;
25
+ set parent(parent: GameObject | null);
26
+ private updateComponentsActiveStatus;
27
+ private updateChildrenActiveStatus;
28
+ get transform(): Transform;
29
+ get rigidBody(): RigidBody;
30
+ /**
31
+ * This method is called when the active state changes.
32
+ */
33
+ protected onActiveChange(): void;
34
+ /**
35
+ * @returns The current loaded scene
36
+ */
37
+ protected getCurrentScene<T extends Scene>(): T;
38
+ /**
39
+ * Add a component to the game obejct
40
+ * @param componentClass The class of the component
41
+ * @returns The added component
42
+ */
43
+ addComponent<ComponentType extends Component = Component>(componentClass: ComponentClass<ComponentType>): ComponentType;
44
+ /**
45
+ * Add a component to the game obejct
46
+ * @param componentClass The class of the component
47
+ * @param options The options passed to the init method of the component
48
+ * @returns The added component
49
+ */
50
+ addComponent<ComponentType extends Component = Component, OptionsType extends InitOptions = InitOptions>(componentClass: ComponentClass<ComponentType>, options: OptionsType): ComponentType;
51
+ /**
52
+ * Add a component to the game obejct
53
+ * @param componentClass The class of the component
54
+ * @param name The name of the component
55
+ * @returns The added component
56
+ */
57
+ addComponent<ComponentType extends Component = Component>(componentClass: ComponentClass<ComponentType>, name: string): ComponentType;
58
+ /**
59
+ * Add a component to the game obejct
60
+ * @param componentClass The class of the component
61
+ * @param options The options passed to the init method of the component
62
+ * @param name The name of the component
63
+ * @returns The added component
64
+ */
65
+ addComponent<ComponentType extends Component = Component, OptionsType extends InitOptions = InitOptions>(componentClass: ComponentClass<ComponentType>, options: OptionsType, name: string): ComponentType;
66
+ private checkMultipleComponent;
67
+ /**
68
+ * Returns all the components in the game object.
69
+ * @returns The found components
70
+ */
71
+ getComponents(): Component[];
72
+ /**
73
+ * Returns all the components for the given class in the game object.
74
+ * @param componentClass The class of the components
75
+ * @returns The found components
76
+ */
77
+ getComponents<T extends Component>(componentClass: ComponentClass<T>): T[];
78
+ /**
79
+ * Returns the first component found for the given class, or undefined otherwise.
80
+ * @param componentClass The class of the component
81
+ * @returns The found component
82
+ */
83
+ getComponent<T extends Component>(componentClass: ComponentClass<T>): T;
84
+ /**
85
+ * Returns the first component found for the given name, or undefined otherwise.
86
+ * @param name The name of the component
87
+ * @returns The found component
88
+ */
89
+ getComponent<T extends Component>(name: string): T;
90
+ /**
91
+ * Returns TRUE if the game object has a component for the given class, or FALSE otherwise
92
+ * @param componentClass The class of the component to find
93
+ * @returns boolean
94
+ */
95
+ hasComponent<T extends Component>(componentClass: ComponentClass<T>): boolean;
96
+ /**
97
+ * @param name The name of the component to find
98
+ * @returns boolean
99
+ */
100
+ hasComponent(name: string): boolean;
101
+ removeComponent(component: Component): void;
102
+ /**
103
+ * Add a child game object.
104
+ * @param gameObjectClass The class of the child game object
105
+ * @param options [optional] This options will be passed to the init method
106
+ * @param name [optional] The name of the game object
107
+ * @returns The added child game object
108
+ */
109
+ addChild<T extends GameObject>(gameObjectClass: GameObjectClass<T>, options?: InitOptions, name?: string): T;
110
+ /**
111
+ * @returns The children game objects
112
+ */
113
+ getChildren<T extends GameObject>(): T[];
114
+ /**
115
+ * Returns the first child found for the given class, or undefined otherwise.
116
+ * @param gameObjectClass The class of the child game object to find
117
+ * @returns The found child game object
118
+ */
119
+ getChild<T extends GameObject>(gameObjectClass: GameObjectClass<T>): T;
120
+ /**
121
+ * Returns the first child found for the given name, or undefined otherwise.
122
+ * @param name The name of the child game object to find
123
+ * @returns The found child game object
124
+ */
125
+ getChild<T extends GameObject>(name: string): T;
126
+ /**
127
+ * Destroy all the children game objects
128
+ */
129
+ destroyChildren(): void;
130
+ protected _destroy(): void;
131
+ private destroyComponents;
132
+ protected _stopGame(): void;
133
+ }
@@ -1,13 +1,13 @@
1
- import { GameCamera } from "../gameObject/GameCamera";
2
- import { Container } from "../utils/Container";
3
- import { Game } from "./Game";
4
- import { GameActor } from "./GameActor";
5
- export type SceneClass = new (container: Container, name: string, game: Game) => Scene;
6
- export declare class Scene extends GameActor {
7
- readonly name: string;
8
- readonly game: Game;
9
- constructor(container: Container, name: string, game: Game);
10
- get gameCamera(): GameCamera;
11
- protected _destroy(): void;
12
- protected _stopGame(): void;
13
- }
1
+ import { GameCamera } from "../gameObject/GameCamera";
2
+ import { Container } from "../utils/Container";
3
+ import { Game } from "./Game";
4
+ import { GameActor } from "./GameActor";
5
+ export type SceneClass = new (container: Container, name: string, game: Game) => Scene;
6
+ export declare class Scene extends GameActor {
7
+ readonly name: string;
8
+ readonly game: Game;
9
+ constructor(container: Container, name: string, game: Game);
10
+ get gameCamera(): GameCamera;
11
+ protected _destroy(): void;
12
+ protected _stopGame(): void;
13
+ }
@@ -1,41 +1,51 @@
1
- import { AssetManager } from "../managers/AssetManager";
2
- export declare class AssetManagerFacade {
3
- private static assetManager;
4
- static initialize(assetManager: AssetManager): void;
5
- /**
6
- * @returns TRUE if all the assets are loaded, FALSE instead
7
- */
8
- static getAssetsLoaded(): boolean;
9
- /**
10
- * @param url The url of the image
11
- * @param preloadTexture [optional] preload the texture for this image
12
- * @returns The created image element
13
- */
14
- static loadImage(url: string, preloadTexture?: boolean): HTMLImageElement;
15
- /**
16
- * @param url The url of the audio file
17
- * @returns The created audio element
18
- */
19
- static loadAudio(url: string): HTMLAudioElement;
20
- /**
21
- * @param family The family name of the font
22
- * @param url The url of the font
23
- * @returns The created fontFace element
24
- */
25
- static loadFont(family: string, url: string): FontFace;
26
- /**
27
- * @param url The url of the image element to find
28
- * @returns the found image element
29
- */
30
- static getImage(url: string): HTMLImageElement;
31
- /**
32
- * @param url The url of the audio element to find
33
- * @returns The found audio element
34
- */
35
- static getAudio(url: string): HTMLAudioElement;
36
- /**
37
- * @param family The family of the font
38
- * @returns The found audio element
39
- */
40
- static getFont(family: string): FontFace;
41
- }
1
+ import { AssetManager } from "../managers/AssetManager";
2
+ export declare class AssetManagerFacade {
3
+ private static assetManager;
4
+ static initialize(assetManager: AssetManager): void;
5
+ /**
6
+ * @returns TRUE if all the assets are loaded, FALSE instead
7
+ */
8
+ static getAssetsLoaded(): boolean;
9
+ /**
10
+ * @param url The url of the image
11
+ * @param preloadTexture [optional] preload the texture for this image
12
+ * @returns The created image element
13
+ */
14
+ static loadImage(url: string, preloadTexture?: boolean): HTMLImageElement;
15
+ /**
16
+ * @param url The url of the audio file
17
+ * @returns The created audio element
18
+ */
19
+ static loadAudio(url: string): HTMLAudioElement;
20
+ /**
21
+ * @param family The family name of the font
22
+ * @param url The url of the font
23
+ * @returns The created fontFace element
24
+ */
25
+ static loadFont(family: string, url: string): FontFace;
26
+ /**
27
+ * @param url The url of the video file
28
+ * @returns The created video element
29
+ */
30
+ static loadVideo(url: string): HTMLVideoElement;
31
+ /**
32
+ * @param url The url of the image element to find
33
+ * @returns the found image element
34
+ */
35
+ static getImage(url: string): HTMLImageElement;
36
+ /**
37
+ * @param url The url of the audio element to find
38
+ * @returns The found audio element
39
+ */
40
+ static getAudio(url: string): HTMLAudioElement;
41
+ /**
42
+ * @param family The family of the font
43
+ * @returns The found audio element
44
+ */
45
+ static getFont(family: string): FontFace;
46
+ /**
47
+ * @param url The url of the video element to find
48
+ * @returns The found video element
49
+ */
50
+ static getVideo(url: string): HTMLVideoElement;
51
+ }
@@ -1,8 +1,8 @@
1
- import { DomManager } from "../managers/DomManager";
2
- export declare class DomManagerFacade {
3
- private static domManager;
4
- static initialize(domManager: DomManager): void;
5
- static get gameWidth(): number;
6
- static get gameHeight(): number;
7
- static get canvas(): HTMLCanvasElement;
8
- }
1
+ import { DomManager } from "../managers/DomManager";
2
+ export declare class DomManagerFacade {
3
+ private static domManager;
4
+ static initialize(domManager: DomManager): void;
5
+ static get gameWidth(): number;
6
+ static get gameHeight(): number;
7
+ static get canvas(): HTMLCanvasElement;
8
+ }
@@ -1,70 +1,70 @@
1
- import { GameObjectManager } from "../managers/GameObjectManager";
2
- import { GameObject, GameObjectClass } from "../GameObject";
3
- import { InitOptions } from "../GameActor";
4
- export declare class GameObjectManagerFacade {
5
- private static manager;
6
- static initialize(manager: GameObjectManager): void;
7
- /**
8
- * Adds a new game object to the scene.
9
- * @param gameObjectClass The class of the game object
10
- * @param options [optional] This options will be passed to the init method
11
- * @param parent [optional] The parent game object
12
- * @param name [optional] The name of the game object
13
- * @returns the added game object
14
- */
15
- static addGameObject<T extends GameObject>(gameObjectClass: GameObjectClass<T>, options?: InitOptions, parent?: GameObject, name?: string): T;
16
- /**
17
- * Returns all the game objects in the scene.
18
- * @returns The found game objects
19
- */
20
- static findAllGameObjects(): GameObject[];
21
- /**
22
- * Returns a collection of game objects found for the given class
23
- * @param gameObjectClass The game object class to find
24
- * @returns The found game objects
25
- */
26
- static findGameObjects<T extends GameObject>(gameObjectClass: GameObjectClass<T>): T[];
27
- /**
28
- * Returns the first game object found for the given class, or undefined otherwise.
29
- * @param gameObjectClass The game object class to find
30
- * @returns The found game object
31
- */
32
- static findGameObject<T extends GameObject>(gameObjectClass: GameObjectClass<T>): T;
33
- /**
34
- * Returns the first game object found for the given name, or undefined otherwise.
35
- * @param name The name of the game object to find
36
- * @returns The found game object
37
- */
38
- static findGameObject<T extends GameObject>(name: string): T;
39
- /**
40
- * Returns a collection of game objects found for the given parent
41
- * @param parent The parent game object
42
- * @returns The found game objects
43
- */
44
- static findGameObjectsByParent<T extends GameObject>(parent: GameObject): T[];
45
- /**
46
- * Returns the first child found for the given parent and class, or undefined otherwise.
47
- * @param parent The parent game object
48
- * @param gameObjectClass The class of the child game object to find
49
- * @returns The found child game object
50
- */
51
- static findGameObjectByParent<T extends GameObject>(parent: GameObject, gameObjectClass: GameObjectClass<T>): T;
52
- /**
53
- * Returns the first child found for the given parent and name, or undefined otherwise.
54
- * @param parent The parent game object
55
- * @param name The name of the child game object to find
56
- * @returns The found child game object
57
- */
58
- static findGameObjectByParent<T extends GameObject>(parent: GameObject, name: string): T;
59
- /**
60
- * Returns a collection of game objects found for the given tag
61
- * @param tag The tag of the game objects to find
62
- * @returns The found game objects
63
- */
64
- static findGameObjectsByTag<T extends GameObject>(tag: string): T[];
65
- /**
66
- * Destroy the game objects
67
- * @param gameObject The game object to destory
68
- */
69
- static destroyGameObject(gameObject: GameObject): void;
70
- }
1
+ import { GameObjectManager } from "../managers/GameObjectManager";
2
+ import { GameObject, GameObjectClass } from "../GameObject";
3
+ import { InitOptions } from "../GameActor";
4
+ export declare class GameObjectManagerFacade {
5
+ private static manager;
6
+ static initialize(manager: GameObjectManager): void;
7
+ /**
8
+ * Adds a new game object to the scene.
9
+ * @param gameObjectClass The class of the game object
10
+ * @param options [optional] This options will be passed to the init method
11
+ * @param parent [optional] The parent game object
12
+ * @param name [optional] The name of the game object
13
+ * @returns the added game object
14
+ */
15
+ static addGameObject<T extends GameObject>(gameObjectClass: GameObjectClass<T>, options?: InitOptions, parent?: GameObject, name?: string): T;
16
+ /**
17
+ * Returns all the game objects in the scene.
18
+ * @returns The found game objects
19
+ */
20
+ static findAllGameObjects(): GameObject[];
21
+ /**
22
+ * Returns a collection of game objects found for the given class
23
+ * @param gameObjectClass The game object class to find
24
+ * @returns The found game objects
25
+ */
26
+ static findGameObjects<T extends GameObject>(gameObjectClass: GameObjectClass<T>): T[];
27
+ /**
28
+ * Returns the first game object found for the given class, or undefined otherwise.
29
+ * @param gameObjectClass The game object class to find
30
+ * @returns The found game object
31
+ */
32
+ static findGameObject<T extends GameObject>(gameObjectClass: GameObjectClass<T>): T;
33
+ /**
34
+ * Returns the first game object found for the given name, or undefined otherwise.
35
+ * @param name The name of the game object to find
36
+ * @returns The found game object
37
+ */
38
+ static findGameObject<T extends GameObject>(name: string): T;
39
+ /**
40
+ * Returns a collection of game objects found for the given parent
41
+ * @param parent The parent game object
42
+ * @returns The found game objects
43
+ */
44
+ static findGameObjectsByParent<T extends GameObject>(parent: GameObject): T[];
45
+ /**
46
+ * Returns the first child found for the given parent and class, or undefined otherwise.
47
+ * @param parent The parent game object
48
+ * @param gameObjectClass The class of the child game object to find
49
+ * @returns The found child game object
50
+ */
51
+ static findGameObjectByParent<T extends GameObject>(parent: GameObject, gameObjectClass: GameObjectClass<T>): T;
52
+ /**
53
+ * Returns the first child found for the given parent and name, or undefined otherwise.
54
+ * @param parent The parent game object
55
+ * @param name The name of the child game object to find
56
+ * @returns The found child game object
57
+ */
58
+ static findGameObjectByParent<T extends GameObject>(parent: GameObject, name: string): T;
59
+ /**
60
+ * Returns a collection of game objects found for the given tag
61
+ * @param tag The tag of the game objects to find
62
+ * @returns The found game objects
63
+ */
64
+ static findGameObjectsByTag<T extends GameObject>(tag: string): T[];
65
+ /**
66
+ * Destroy the game objects
67
+ * @param gameObject The game object to destory
68
+ */
69
+ static destroyGameObject(gameObject: GameObject): void;
70
+ }
@@ -1,13 +1,13 @@
1
- import { GamepadController } from "../../input/GamepadController";
2
- import { InputManager } from "../../input/InputManager";
3
- import { KeyboardController } from "../../input/KeyboardController";
4
- import { MouseController } from "../../input/MouseController";
5
- import { TouchController } from "../../input/TouchController";
6
- export declare class InputManagerFacade {
7
- private static inputManager;
8
- static initialize(inputManager: InputManager): void;
9
- static get mouse(): MouseController;
10
- static get keyboard(): KeyboardController;
11
- static get gamepad(): GamepadController;
12
- static get touch(): TouchController;
13
- }
1
+ import { GamepadController } from "../../input/GamepadController";
2
+ import { InputManager } from "../../input/InputManager";
3
+ import { KeyboardController } from "../../input/KeyboardController";
4
+ import { MouseController } from "../../input/MouseController";
5
+ import { TouchController } from "../../input/TouchController";
6
+ export declare class InputManagerFacade {
7
+ private static inputManager;
8
+ static initialize(inputManager: InputManager): void;
9
+ static get mouse(): MouseController;
10
+ static get keyboard(): KeyboardController;
11
+ static get gamepad(): GamepadController;
12
+ static get touch(): TouchController;
13
+ }
@@ -1,18 +1,18 @@
1
- import { SceneManager } from "../managers/SceneManager";
2
- export declare class SceneManagerFacade {
3
- private static sceneManager;
4
- static initialize(sceneManager: SceneManager): void;
5
- /**
6
- * Unload the current scene and load the new scene
7
- * @param name The scene name to load
8
- */
9
- static loadScene(name: string): void;
10
- /**
11
- * @returns The name of the current scene
12
- */
13
- static getCurrentSceneName(): string;
14
- /**
15
- * Load the opening scene
16
- */
17
- static loadOpeningScene(): void;
18
- }
1
+ import { SceneManager } from "../managers/SceneManager";
2
+ export declare class SceneManagerFacade {
3
+ private static sceneManager;
4
+ static initialize(sceneManager: SceneManager): void;
5
+ /**
6
+ * Unload the current scene and load the new scene
7
+ * @param name The scene name to load
8
+ */
9
+ static loadScene(name: string): void;
10
+ /**
11
+ * @returns The name of the current scene
12
+ */
13
+ static getCurrentSceneName(): string;
14
+ /**
15
+ * Load the opening scene
16
+ */
17
+ static loadOpeningScene(): void;
18
+ }