mixins.d.ts 2.0 KB

123456789101112131415161718192021222324252627282930
  1. export declare const ComputedSize: any;
  2. export declare const Depth: any;
  3. export declare const Flip: any;
  4. export declare const ScrollFactor: any;
  5. export declare const Transform: any;
  6. export declare const Visible: any;
  7. export declare const Origin: any;
  8. export declare const Alpha: any;
  9. export interface Type<T, P extends any[] = any[]> extends Function {
  10. new (...args: P): T;
  11. }
  12. export type Mixin<GameObjectComponent, GameObjectConstraint extends Phaser.GameObjects.GameObject> = <GameObjectType extends Type<GameObjectConstraint>>(BaseGameObject: GameObjectType) => GameObjectType & Type<GameObjectComponent>;
  13. export declare function createMixin<GameObjectComponent, GameObjectConstraint extends Phaser.GameObjects.GameObject = Phaser.GameObjects.GameObject>(...component: GameObjectComponent[]): Mixin<GameObjectComponent, GameObjectConstraint>;
  14. type ComputedSizeMixin = Mixin<Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.GameObject>;
  15. export declare const ComputedSizeMixin: ComputedSizeMixin;
  16. type DepthMixin = Mixin<Phaser.GameObjects.Components.Depth, Phaser.GameObjects.GameObject>;
  17. export declare const DepthMixin: DepthMixin;
  18. type FlipMixin = Mixin<Phaser.GameObjects.Components.Flip, Phaser.GameObjects.GameObject>;
  19. export declare const FlipMixin: FlipMixin;
  20. type ScrollFactorMixin = Mixin<Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.GameObject>;
  21. export declare const ScrollFactorMixin: ScrollFactorMixin;
  22. type TransformMixin = Mixin<Phaser.GameObjects.Components.Transform, Phaser.GameObjects.GameObject>;
  23. export declare const TransformMixin: TransformMixin;
  24. type VisibleMixin = Mixin<Phaser.GameObjects.Components.Visible, Phaser.GameObjects.GameObject>;
  25. export declare const VisibleMixin: VisibleMixin;
  26. type OriginMixin = Mixin<Phaser.GameObjects.Components.Origin, Phaser.GameObjects.GameObject>;
  27. export declare const OriginMixin: OriginMixin;
  28. type AlphaMixin = Mixin<Phaser.GameObjects.Components.Alpha, Phaser.GameObjects.GameObject>;
  29. export declare const AlphaMixin: AlphaMixin;
  30. export {};