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
photonstorm
9acf7c223e
Docs and TS updates.
2016-02-18 13:05:00 +00:00
photonstorm
882c8b8d40
InputHandler.consumePointerEvent has been removed, as it was never used internally anyway, so was misleading (thanks @GregoryAveryWeir #2227 )
2016-02-04 16:46:35 +00:00
photonstorm
5bcfa08af6
Text.useAdvancedWrap allows you to swap between the Basic and the Advanced word wrapping functions. In Advanced it will wrap long-words and condense and trim excess white space (thanks @soldoutactivist #1811 )
2016-02-04 16:00:21 +00:00
Richard Davey
87318ee0fe
TS defs fix.
2016-02-03 22:22:17 +00:00
Richard Davey
90ddfc2aa2
Updated sow #2316
2016-02-03 11:41:37 +00:00
Richard Davey
75d6bbb251
Updated defs and improved jsdocs for #2277
2016-02-02 23:37:08 +00:00
Richard Davey
741cf1e0ed
Huge TypeScript defs update (thanks to @clark-stevenson - this is all of the changes from #2156 merged into the current build)
2016-02-02 23:30:03 +00:00
Stafford Williams
b904efeb4f
allow state to be passed to constructor
2016-02-02 13:47:21 +11:00
Stafford Williams
02c0f27d64
fixed getter
2016-02-02 13:26:47 +11:00
Stafford Williams
4a0aaa8914
added RandomDataGenerator.state() typescript definitions
2016-02-02 13:21:45 +11:00
Richard Davey
a1d9d0bb95
Merge pull request #2198 from vulvulune/dev
...
Force the usage of typescript 1.4.1
2016-02-01 19:03:47 +02:00
Richard Davey
cd68f9f9cd
Defs udpate #2211
2016-02-01 16:54:25 +00:00
Richard Davey
5170ad0d46
Merge pull request #2211 from juanmirod/dev
...
Fix in typescript definition file: Pointer definition
2016-02-01 18:52:52 +02:00
Richard Davey
c1169b35d4
Merge pull request #2252 from milkey-mouse/fix-blendmode-tsdefs
...
Fix issue #2188 : BitmapData.copy() blendMode type from number to string in TS defs
2016-02-01 18:47:01 +02:00
Richard Davey
a74edd1ee9
Docs and defs.
2016-02-01 16:38:06 +00:00
Richard Davey
37d9b3402d
Merge pull request #2226 from milkey-mouse/fix-retrofont-smoothed
...
Change RetroFont.smoothed from string to boolean
2016-02-01 18:32:22 +02:00
Richard Davey
3350c537c7
Defs update and README update.
2016-02-01 16:30:41 +00:00
Richard Davey
1f664af97c
Merge pull request #2255 from PixelWaffles/fix-ts-d-export
...
Fix issue with typescript module import/require.
2016-02-01 18:28:59 +02:00
zimpy
13ffb7d1ce
Typescript definitions - fixed return types on some functions of Arcade.Body
2016-01-15 19:30:29 +01:00
pixelwaffles
08be1e9b2e
Fix issue where importing the phaser module in typescript (ie "import * as phaser from 'phaser';" or "require('phaser');") fails, resulting in a "Cannot find module 'phaser'." typescript error.
2015-12-15 22:31:21 +08:00
Milkey Mouse
df48e37658
Fix issue #2188 : blendMode type from number to string
...
This fixes a minor TS definitions bug (issue #2188 ) where the blendMode
of BitmapData.copy, .copyRect, .draw, and .drawGroup all had the number
type instead of string.
2015-12-10 20:40:50 -08:00
Milkey Mouse
c59243b336
TS defs: RetroFont.smoothed from string to boolean
2015-11-22 21:38:09 -08:00
Juan Miguel Rodriguez Ceron
cbdd9bdfab
Update phaser.d.ts
2015-11-18 01:16:54 +01:00
Juan Miguel Rodriguez Ceron
e3ff1a3774
Fix Pointer leftbutton and rightButton definitions
...
Pointer properties rightButton and LeftButton are DeviceButton objects instead of booleans (http://phaser.io/docs/2.4.4/Phaser.Pointer.html#rightButton )
2015-11-18 01:15:09 +01:00
vulvulune
02a56316c3
Force the usage of typescript 1.4.1
...
Force the usage of typescript 1.4.1 because with higher versions the
generation of commented files failed. Refresh comments.d.ts files.
2015-11-09 09:53:34 +01:00
photonstorm
c9c85330ab
2.4.4 Release.
2015-10-15 12:06:38 +01:00
Clark Stevenson
13d4dfd9e3
TypeScript Definitions. PluginManager.add is now generic. Whatever class you pass in will come back out as an instance. Example var myAStar = this.game.plugins.add(Phaser.Plugin.AStar);
2015-10-06 15:34:26 +01:00
Clark Stevenson
41ff44229a
Misc Formatting
2015-10-06 15:30:54 +01:00
Clark Stevenson
1c113bc414
Minor TS updates. Added missing DeviceButton.
2015-09-13 21:43:38 +01:00
Richard Davey
38eca4d5b9
Filter.addToWorld allows you to quickly create a Phaser.Image object at the given position and size, with the Filter ready applied to it. This can eliminate lots of duplicate code.
2015-09-03 00:46:47 +01:00
Richard Davey
d6ae99544b
Merge pull request #2042 from cloakedninjas/dev
...
Fixing typos in transformCallbackContext
2015-08-31 13:15:05 +03:00
Richard Davey
f46e6e3778
Merge pull request #2043 from Garbanas/feature/typescript-definitions
...
Updated typescript definitions for Phaser 2.4.3
2015-08-31 13:14:32 +03:00
Christoph Dörfel
2623ddeaf7
Convenience function to remove a collision group from a P2 Body
2015-08-30 00:19:37 +02:00
Christoph Dörfel
c30b993cb9
Add some changes from phaser.comments.d.ts back to phaser.d.ts
2015-08-29 23:08:07 +02:00
Christoph Dörfel
ab6feb3ebc
Fix CachedImage interface definition
2015-08-29 22:52:53 +02:00
Christoph Dörfel
2796a9db48
Updated typescript definitions for Phaser 2.4.3
2015-08-28 15:09:41 +02:00
photonstorm
32b0c98f7a
Group.resetChild is a new method that allows you to call both child.reset
and/or child.loadTexture
on the given child object. This is used internally by getFirstDead
and similar, but is made public so you can use it as a group iteration callback. Note that the child must have public reset
and loadTexture
methods to be valid for the call.
...
Group.getFirstDead, Group.getFirstAlive and Group.getFirstExists all have new optional arguments: `createIfNull`, `x`, `y`, `key` and `frame`. If the method you call cannot find a matching child (i.e. getFirstDead cannot find any dead children) then the optional `createIfNull` allows you to instantly create a new child in the group using the position and texture arguments to do so. This allows you to always get a child back from the Group and remove the need to do null checks and Group inserts from your game code. The same arguments can also be used in a different way: if `createIfNull` is false AND you provide the extra arguments AND a child is found then it will be passed to the new `Group.resetChild` method. This allows you to retrieve a child from the Group and have it reset and instantly ready for use in your game without any extra code.
2015-08-28 12:23:48 +01:00
cloakedninjas
efd6a5e152
Fixing typos in transformCallbackContext
2015-08-28 10:10:29 +01:00
Vladislav Forsh
fb299b8838
Fixed few typos in typings
2015-08-27 13:56:49 +03:00
Vladislav Forsh
3b71baff7d
Fixed typos in typings for CachedImage
2015-08-27 13:53:22 +03:00
timotei
5ec7d7e4c9
Fix TypeScript addKeys
declaration
...
Since we expect an object that's `any`
instead of an array `any[]`
2015-08-27 11:21:57 +03:00