mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 19:13:37 +00:00
1 line
11 KiB
JSON
1 line
11 KiB
JSON
|
{"class":{"name":"Phaser.AnimationManager","extends":"","static":false,"constructor":true,"parameters":[{"name":"sprite","type":["Phaser.Sprite"],"help":"A reference to the Game Object that owns this AnimationManager.","optional":false,"default":null}],"help":"The Animation Manager is used to add, play and update Phaser Animations.\\nAny Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance."},"consts":[],"methods":{"public":[{"name":"add","static":false,"returns":{"types":["Phaser.Animation"],"help":"The Animation object that was created."},"help":"Adds a new animation under the given key. Optionally set the frames, frame rate and loop.\\nAnimations added in this way are played back with the play function.","line":179,"public":true,"protected":false,"private":false,"parameters":[{"name":"name","type":["string"],"help":"The unique (within this Sprite) name for the animation, i.e. \"run\", \"fire\", \"walk\".","optional":false,"default":null},{"name":"frames","type":["array"],"help":"An array of numbers\/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used.","optional":true,"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":"useNumericIndex","type":["boolean"],"help":"Are the given frames using numeric indexes (default) or strings?","optional":true,"default":"true"}],"inherited":false,"inheritedFrom":""},{"name":"destroy","static":false,"returns":null,"help":"Destroys all references this AnimationManager contains.\\nIterates through the list of animations stored in this manager and calls destroy on each of them.","line":434,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"getAnimation","static":false,"returns":{"types":["Phaser.Animation"],"help":"The Animation instance, if found, otherwise null."},"help":"Returns an animation that was previously added by name.","line":397,"public":true,"protected":false,"private":false,"parameters":[{"name":"name","type":["string"],"help":"The name of the animation to be returned, e.g. \"fire\".","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"next","static":false,"returns":null,"help":"Advances by the given number of frames in the current animation, taking the loop value into consideration.","line":364,"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":"play","static":false,"returns":{"types":["Phaser.Animation"],"help":"A reference to playing Animation instance."},"help":"Play an animation based on the given key. The animation should previously have been added via sprite.animations.add()\\nIf the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.","line":275,"public":true,"protected":false,"private":false,"parameters":[{"name":"name","type":["string"],"help":"The name of the animation to be played, e.g. \"fire\", \"walk\", \"jump\".","optional":false,"default":null},{"name":"frameRate","type":["number"],"help":"The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.","optional":true,"default":"null"},{"name":"loop","type":["boolean"],"help":"Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.","optional":true,"default":"false"},{"name":"killOnComplete","type":["boolean"],"help":"If set to true when the animation completes (onl
|