Commit graph

255 commits

Author SHA1 Message Date
Richard Davey
1956d3584e InputHandler.dragStopBlocksInputUp is a boolean that allows you to control what happens with the input events. If false (the default) then both the onInputUp and onDragStop events will get dispatched when a Sprite stops being dragged. If true then only the onDragStop event is dispatched, and the onInputUp is skipped. 2016-06-07 02:21:12 +01:00
Richard Davey
df92c45420 There are two new Phaser consts available, for help with orientation of games or Game Objects. They are Phaser.HORIZONTAL, Phaser.VERTICAL, Phaser.LANDSCAPE and Phaser.PORTRAIT. 2016-06-07 01:45:33 +01:00
Richard Davey
66b846cbdb InputHandler.dragDistanceThreshold gives you more fine control over when a Sprite Drag event will start. It allows you to specify a distance, in pixels, that the pointer must have moved before the drag will begin.
InputHandler.dragTimeThreshold gives you more fine control over when a Sprite Drag event will start. It allows you to specify a time, in ms that the pointer must have been held down for, before the drag will begin.

InputHandler.downPoint is a new Point object that contains the coordinates of the Pointer when it was first pressed down on the Sprite.
2016-06-07 01:28:06 +01:00
BaroqueEngine
042fc28513 Fixed typescript definitions: ArrayUtils.rotateMatrix and ArrayUtils.numberArrayStep 2016-06-06 17:27:32 +09:00
photonstorm
aa8e5f00db Phaser 2.4.9 RC2. 2016-06-03 18:48:34 +01:00
photonstorm
1a67079ae7 Phew. Added TypeScript defs for the Weapon Plugin. Don't say I never do anything for you! 2016-06-03 17:11:08 +01:00
photonstorm
93b1f3eba1 Math.between will return a value between the given min and max values. 2016-06-03 16:18:35 +01:00
photonstorm
ee6f277b31 PluginManager.remove has a new argument destroy (defaults to true) which will let you optionally called the destroy method of the Plugin being removed. 2016-06-03 15:52:17 +01:00
photonstorm
0da7cf5ffd There are a bunch of new Phaser consts available to help with setting the angle of a Game Object. They are Phaser.ANGLE_UP, ANGLE_DOWN, ANGLE_LEFT, ANGLE_RIGHT, ANGLE_NORTH_EAST, ANGLE_NORTH_WEST, ANGLE_SOUTH_EAST and ANGLE_SOUTH_WEST. 2016-06-03 15:19:18 +01:00
photonstorm
9ae43757b9 Group.removeAll has a new argument destroyTexture which allows you to optionally destroy the BaseTexture of each child, as it is removed from the Group (thanks @stoneman1 #2487) 2016-06-03 13:11:03 +01:00
Richard Davey
097add1aa6 Game Objects including Sprite, Image, Particle, TilemapLayer, Text, BitmapText and TileSprite have a new property called data. This is an empty Object that Phaser will never touch internally, but your own code, or Phaser Plugins, can store Game Object specific data within it. This allows you to associate data with a Game Object without having to pollute or change its class shape. 2016-06-03 01:08:32 +01:00
photonstorm
127e36df20 Defs update #2510 2016-06-02 15:14:11 +01:00
photonstorm
cb70152bc0 Defs update #2517 2016-06-02 15:13:00 +01:00
photonstorm
dfa8b9dedc Refactored Group.getClosestTo and Group.getFurthestFrom. 2016-06-02 15:11:23 +01:00
Richard Davey
837d3cba46 Merge pull request #2505 from gotenxds/ReverseAnimation
Added a reverse functionality to animations.
2016-06-02 15:01:57 +01:00
gotenxds
b34860c89b Reverse and reverseOnce will now return the animation to allow linking. 2016-05-31 20:27:55 +03:00
pigeonT
93c0cf378f bugfix, in Class Graphics, the method generateTexture should return type RenderTexture, but not current Texture. When use typescript to compile, there is a Error: Type 'Texture' is not assignable to type 'RenderTexture'. 2016-05-29 23:36:18 +02:00
gotenxds
ae3ebf00cd Added typescript defs; Fixed jshint. 2016-05-27 18:04:33 +03:00
gotenxds
b0c4f3bc4c Added a convenient function. 2016-05-27 17:48:06 +03:00
John Doe
ce17ac9902 Added a reverse functionality to animations. 2016-05-27 15:44:32 +03:00
photonstorm
027725e702 Defs update. 2016-05-24 02:31:07 +01:00
Richard Davey
07e2edc651 Merge pull request #2495 from monagames/ts-colormatrix-filter-fix
Ts colormatrix filter fix
2016-05-23 12:39:22 +01:00
Richard Davey
06bd29662a Merge pull request #2491 from monagames/systemjs-ts-fixes
Fixes for typescript declarations with system.js
2016-05-23 12:34:50 +01:00
monagames
2fee58fefc Fixed typescript definitions for PIXI ColorMatrixFilter 2016-05-22 09:58:10 +02:00
monagames
12397377ab Fixes for typescript declarations with system.js 2016-05-21 20:22:40 +02:00
Thanabodee Charoenpiriyakij
1387aaa055 typescript/pixi.d.ts: Add padding to Graphics.generateTexture 2016-05-21 14:12:37 +07:00
photonstorm
9f28d0659d Phaser 2.4.8 release. 2016-05-19 12:36:51 +01:00
photonstorm
ac89d1aec7 Arcade Physics Body has a new property worldBounce. This controls the elasticity of the Body specifically when colliding with the World bounds. By default this property is null, in which case Body.bounce is used instead. Set this property to a Phaser.Point object in order to enable a World bounds specific bounce value (thanks @VitaZheltyakov #2465) 2016-05-16 13:53:12 +01:00
photonstorm
19dce62734 Arcade Physics has had a new world argument added to the following functions: distanceBetween, distanceToXY, distanceToPointer, angleBetween, angleToXY and angleToPointer. The argument (which is false by default), when enabled will calculate the angles or distances based on the Game Objects world property, instead of its x and y properties. This allows it to work for objects that are placed in offset Groups, or are children of other display objects (thanks @Skeptron for the thread #2463) 2016-05-16 13:31:57 +01:00
photonstorm
a26bd55811 TS defs fix #2475 2016-05-16 13:03:48 +01:00
Richard Davey
6eca457877 Merge pull request #2476 from staff0rd/generate_texture
fix generateTexture return type
2016-05-16 12:56:27 +01:00
photonstorm
4fd2524c61 Text.setStyle has a new argument update which will optionally automatically call updateText after setting the new style (thanks @staff0rd #2478) 2016-05-16 12:55:27 +01:00
stafford
e6b9ca4e22 fix generateTexture return type 2016-05-12 15:30:33 +10:00
photonstorm
2e1c858196 Added Create. 2016-04-29 01:41:15 +01:00
Richard Davey
88977e4609 Merge pull request #2444 from staff0rd/typescript_SaveCPU_Plugin
added type definintions for SaveCPU plugin
2016-04-28 00:05:31 +01:00
Richard Davey
d16ef28ae6 Merge pull request #2452 from osev7/patch-1
typescript defs: Allow game.physics.arcade.collide(group) for collisions within group
2016-04-27 23:56:43 +01:00
osev7
65f7f06849 Allow game.physics.arcade.collide(group) for collisions within group 2016-04-26 09:41:13 -04:00
photonstorm
620b95e510 Updated docs and TS defs re: #2443 2016-04-23 04:36:47 +01:00
Stafford Williams
0628870540 fix type 2016-04-23 12:33:12 +10:00
Stafford Williams
c3bc464b1c added type definintions for SaveCPU plugin 2016-04-23 12:13:30 +10:00
photonstorm
a29cc64932 Phaser 2.4.7 Final. 2016-04-22 15:15:28 +01:00
Matthew Ross
55214fe2df Allow debug.line to be used without error TS2346
When calling debug.line('Any string'); the TypeScript compiler give error TS2346 because there are no parameters in the method definition. This creates a dummy parameter which allows the same functionality without the compiler error.
2016-04-20 09:19:11 -04:00
jamesgroat
51db815d3a Add resolution to interface IGameConfig 2016-04-11 14:03:26 -07:00
photonstorm
7102a34706 Camera.flash is a new function that makes the camera 'flash' over the top of your game. It works by filling the game with the solid fill color specified, and then fading it away to alpha 0 over the duration given. This is great for things like hit effects. You can listen for the Camera.onflashComplete Signal.
Camera.fade is a new function that makes the camera fade to the color given, over the course of the duration specified. This is great for things like transitioning from one State to another. You can listen for the Camera.onFadeComplete Signal.

Camera.resetFX resets any active FX, such as a fade or flash and immediately clears it. Useful to calling after a fade in order to remove the fade from the Stage.

Phaser.Camera.ENABLE_FX is a const that controls if the Camera FX are available or not. It's `true` by default, but if you set it to `false` before boot then it won't create the Graphics object required to process the effects.
2016-04-09 04:05:07 +01:00
photonstorm
2ea94c83e6 Camera.shake is a new function that creates a camera shake effect. You can specify the intensity, duration and direction of the effect. You can also set if it should shake the camera out of bounds or not. 2016-04-09 02:57:16 +01:00
photonstorm
460c444acf Camera lerp TS defs update. 2016-04-09 01:35:58 +01:00
photonstorm
896b32a28c SoundManager.muteOnPause is a new boolean that allows you to control if the Sound system gets muted automatically when a Phaser game pauses, such as when it loses focus. You may need to set this to false if you wish to control the audio system from outside of your Phaser game, i.e. from DOM buttons or similar (#2382) 2016-04-06 02:09:22 +01:00
slash
fbdf8073ad Add "maxLines" style attribute to Text object, maximum number of lines
to be shown for wrapped text or 0 for no limit. (default).
2016-04-03 10:08:35 -05:00
Richard Davey
0c48c2d6a8 * Added P2.Body.thrustLeft which will move the Body to the left by the speed given (thanks James Pryor)
* Added P2.Body.thrustRight which will move the Body to the right by the speed given (thanks James Pryor)
2016-03-01 22:31:58 +00:00
photonstorm
47123c192d 2.4.6 Build files + docs + TS Docs. 2016-02-18 14:41:53 +00:00