mirror of
https://github.com/photonstorm/phaser
synced 2024-12-24 03:53:28 +00:00
1 line
14 KiB
JSON
1 line
14 KiB
JSON
|
{"class":{"name":"Phaser.Animation","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"A reference to the currently running game.","optional":false,"default":null},{"name":"parent","type":["Phaser.Sprite"],"help":"A reference to the owner of this Animation.","optional":false,"default":null},{"name":"name","type":["string"],"help":"The unique name for this animation, used in playback commands.","optional":false,"default":null},{"name":"frameData","type":["Phaser.FrameData"],"help":"The FrameData object that contains all frames used by this Animation.","optional":false,"default":null},{"name":"frames","type":["array number","array string"],"help":"An array of numbers or strings indicating which frames to play in which order.","optional":false,"default":null},{"name":"frameRate","type":["number"],"help":"The speed at which the animation should play. The speed is given in frames per second.","optional":true,"default":"60"},{"name":"loop","type":["boolean"],"help":"Whether or not the animation is looped or just plays once.","optional":true,"default":"false"},{"name":"loop","type":["boolean"],"help":"Should this animation loop when it reaches the end or play through once.","optional":false,"default":null}],"help":"An Animation instance contains a single animation and the controls to play it.\\nIt is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite."},"consts":[],"methods":{"public":[{"name":"complete","static":false,"returns":null,"help":"Called internally when the animation finishes playback.\\nSets the isPlaying and isFinished states and dispatches the onAnimationComplete event if it exists on the parent and local onComplete event.","line":575,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"destroy","static":false,"returns":null,"help":"Cleans up this animation ready for deletion. Nulls all values and references.","line":546,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"generateFrameNames","static":true,"returns":{"types":["array"],"help":"An array of framenames."},"help":"Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers.\\nFor example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large'\\nYou could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4);","line":746,"public":true,"protected":false,"private":false,"parameters":[{"name":"prefix","type":["string"],"help":"The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'.","optional":false,"default":null},{"name":"start","type":["number"],"help":"The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the start is 1.","optional":false,"default":null},{"name":"stop","type":["number"],"help":"The number to count to. If your frames are named 'explosion_0001' to 'explosion_0034' the stop value is 34.","optional":false,"default":null},{"name":"suffix","type":["string"],"help":"The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'.","optional":true,"default":"''"},{"name":"zeroPad","type":["number"],"help":"The number of zeroes to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4.","optional":true,"default":"0"}],"inherited":false,"inheritedFrom":""},{"name":"next","static":false,"returns":null,"help":"Advances by the given number of frames in the Animation, taking the loop value into consideration.","line":436,"public":true,"protected":false,"private":false,"parameters":[{"name":"quantity","type":["number"],"help":"The number of frames to advance.","optional":true,"default":"1"}],"inherited":false,"inheritedFrom":""},{"name":"onPause","static":false,"returns":
|