angry-pixel 2.0.8 → 2.0.10

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.
package/lib/index.d.ts CHANGED
@@ -953,6 +953,13 @@ declare class SystemManager {
953
953
  * @internal
954
954
  */
955
955
  getSystem<T extends System>(systemType: SystemType<T>): T;
956
+ /**
957
+ * Returns TRUE wether the given group has systems
958
+ * @param group The system group
959
+ * @returns boolean
960
+ * @internal
961
+ */
962
+ groupHasSystems(group: SystemGroup): boolean;
956
963
  /**
957
964
  * Enables a system by its type.\
958
965
  * The method `onEnabled` of the system will be called. If the system is enabled for the first time, the method `onCreate` will also be called.
@@ -1083,6 +1090,7 @@ type CollisionMatrix = [string, string][];
1083
1090
  * canvasColor: "#000000",
1084
1091
  * physicsFramerate: 180,
1085
1092
  * headless: false,
1093
+ * dependencies: [[Symbol.for("DependencyName"), dependencyInstance]],
1086
1094
  * collisions: {
1087
1095
  * collisionMatrix: [
1088
1096
  * ["layer1", "layer2"],
@@ -1112,6 +1120,8 @@ interface GameConfig {
1112
1120
  physicsFramerate?: number;
1113
1121
  /** Enable Headless mode. The input and rendering functions are turned off. Ideal for game server development */
1114
1122
  headless?: boolean;
1123
+ /** External elements which can be accessed through dependency injection.*/
1124
+ dependencies?: [DependencyName, any][];
1115
1125
  /** Collision configuration options */
1116
1126
  collisions?: {
1117
1127
  /** Collision detection method: CollisionMethods.SAT or CollisionMethods.ABB. Default value is CollisionMethods.SAT */
@@ -1225,16 +1235,18 @@ type SceneType<T extends Scene = Scene> = {
1225
1235
  * @category Core
1226
1236
  * @example
1227
1237
  * ```js
1228
- * class GameScene extends Scene {
1229
- * systems = [
1230
- * SomeSystem,
1231
- * AnotherSystem
1232
- * ];
1233
- *
1238
+ * class MainScene extends Scene {
1234
1239
  * loadAssets() {
1235
1240
  * this.assetManager.loadImage("image.png");
1236
1241
  * }
1237
1242
  *
1243
+ * loadSystems() {
1244
+ * this.systems.push(
1245
+ * SomeSystem,
1246
+ * AnotherSystem
1247
+ * );
1248
+ * }
1249
+ *
1238
1250
  * setup() {
1239
1251
  * this.entityManager.createEntity([
1240
1252
  * SomeComponent,
@@ -1249,6 +1261,7 @@ declare abstract class Scene {
1249
1261
  protected readonly assetManager: AssetManager;
1250
1262
  systems: SystemType[];
1251
1263
  constructor(entityManager: EntityManager, assetManager: AssetManager);
1264
+ loadSystems(): void;
1252
1265
  loadAssets(): void;
1253
1266
  setup(): void;
1254
1267
  }
@@ -1270,12 +1283,13 @@ declare class SceneManager {
1270
1283
  private openingSceneName;
1271
1284
  private currentSceneName;
1272
1285
  private sceneNameToBeLoaded;
1273
- private loadingScene;
1286
+ private _loadingScene;
1274
1287
  /** @internal */
1275
1288
  constructor(systemManager: SystemManager, systemFactory: CreateSystemService, entityManager: EntityManager, assetManager: AssetManager);
1276
1289
  addScene(sceneType: SceneType, name: string, openingScene?: boolean): void;
1277
1290
  loadScene(name: string): void;
1278
1291
  loadOpeningScene(): void;
1292
+ loadingScene(): boolean;
1279
1293
  /** @internal */
1280
1294
  update(): void;
1281
1295
  private destroyCurrentScene;
@@ -2608,6 +2622,8 @@ interface TilemapRendererOptions {
2608
2622
  tileWidth: number;
2609
2623
  tileHeight: number;
2610
2624
  tintColor: string;
2625
+ maskColor: string;
2626
+ maskColorMix: number;
2611
2627
  opacity: number;
2612
2628
  smooth: boolean;
2613
2629
  }
@@ -2637,6 +2653,10 @@ declare class TilemapRenderer {
2637
2653
  tintColor: string;
2638
2654
  /** Change the opacity between 1 and 0 */
2639
2655
  opacity: number;
2656
+ /** Define a mask color for the image */
2657
+ maskColor: string;
2658
+ /** Define the opacity of the mask color between 1 and 0 */
2659
+ maskColorMix: number;
2640
2660
  /** TRUE for smooth pixels (not recommended for pixel art) */
2641
2661
  smooth: boolean;
2642
2662
  /** @internal */