mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 19:13:37 +00:00
1 line
No EOL
10 KiB
JSON
1 line
No EOL
10 KiB
JSON
{"class":{"name":"Phaser.Time","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":" A reference to the currently running game.","optional":false,"default":null}],"help":"This is the core internal game clock.\\nIt manages the elapsed time and calculation of elapsed values, used for game object motion and tweens."},"consts":[],"methods":{"public":[{"name":"add","static":false,"returns":{"types":["Phaser.Timer"],"help":"The given Phaser.Timer object."},"help":"Adds an existing Phaser.Timer object to the Timer pool.","line":191,"public":true,"protected":false,"private":false,"parameters":[{"name":"timer","type":["Phaser.Timer"],"help":"An existing Phaser.Timer object.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"create","static":false,"returns":{"types":["Phaser.Timer"],"help":"The Timer object that was created."},"help":"Creates a new stand-alone Phaser.Timer object.","line":206,"public":true,"protected":false,"private":false,"parameters":[{"name":"autoDestroy","type":["boolean"],"help":"A Timer that is set to automatically destroy itself will do so after all of its events have been dispatched (assuming no looping events).","optional":true,"default":"true"}],"inherited":false,"inheritedFrom":""},{"name":"elapsedSecondsSince","static":false,"returns":{"types":["number"],"help":"Duration between given time and now (in seconds)."},"help":"How long has passed since the given time (in seconds).","line":390,"public":true,"protected":false,"private":false,"parameters":[{"name":"since","type":["number"],"help":"The time you want to measure (in seconds).","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"elapsedSince","static":false,"returns":{"types":["number"],"help":"The difference between the given time and now."},"help":"How long has passed since the given time.","line":379,"public":true,"protected":false,"private":false,"parameters":[{"name":"since","type":["number"],"help":"The time you want to measure against.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"removeAll","static":false,"returns":null,"help":"Remove all Timer objects, regardless of their state. Also clears all Timers from the Time.events timer.","line":223,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"reset","static":false,"returns":null,"help":"Resets the private _started value to now and removes all currently running Timers.","line":399,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"totalElapsedSeconds","static":false,"returns":{"types":["number"],"help":"The number of seconds that have elapsed since the game was started."},"help":"The number of seconds that have elapsed since the game was started.","line":368,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"protected":[{"name":"boot","static":false,"returns":null,"help":"Called automatically by Phaser.Game after boot. Should not be called directly.","line":177,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"update","static":false,"returns":null,"help":"Updates the game clock and if enabled the advanced timing data. This is called automatically by Phaser.Game.","line":243,"public":false,"protected":true,"private":false,"parameters":[{"name":"time","type":["number"],"help":"The current timestamp.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"private":[{"name":"gamePaused","static":false,"returns":null,"help":"Called when the game enters a paused state.","line":323,"public":false,"protected":false,"private":true,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"gameResumed","static":false,"returns":null,"help":"Called when the game resumes from a paused state.","line":344,"public":false,"protected":false,"private":true,"parameters":[],"inherited":false,"inheritedFrom":""}],"static":[]},"properties":{"public":[{"name":"advancedTiming","type":["boolean"],"help":"","inlineHelp":"If true Phaser.Time will perform advanced profiling including the fps rate, fps min\/max and msMin and msMax.","line":56,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"deltaCap","type":["number"],"help":"","inlineHelp":"If you need to cap the delta timer, set the value here. For 60fps the delta should be 0.016, so try variances just above this.","line":93,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"events","type":["Phaser.Timer"],"help":"","inlineHelp":"This is a Phaser.Timer object bound to the master clock to which you can add timed events.","line":123,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"fpsMax","type":["number"],"help":"","inlineHelp":"The highest rate the fps has reached (usually no higher than 60fps). Only calculated if Time.advancedTiming is true.","line":72,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"fpsMin","type":["number"],"help":"","inlineHelp":"The lowest rate the fps has dropped to. Only calculated if Time.advancedTiming is true.","line":67,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"frames","type":["number"],"help":"","inlineHelp":"The number of frames record in the last second. Only calculated if Time.advancedTiming is true.","line":103,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"Local reference to game.","line":20,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"lastTime","type":["number"],"help":"","inlineHelp":"Internal value used by timeToCall as part of the setTimeout loop","line":118,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"msMax","type":["number"],"help":"","inlineHelp":"The maximum amount of time the game has taken between two frames. Only calculated if Time.advancedTiming is true.","line":83,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"msMin","type":["number"],"help":"","inlineHelp":"The minimum amount of time the game has taken between two frames. Only calculated if Time.advancedTiming is true.","line":78,"default":"1000","public":true,"protected":false,"private":false,"readOnly":false},{"name":"pauseDuration","type":["number"],"help":"","inlineHelp":"Records how long the game was paused for in miliseconds.","line":108,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"physicsElapsed","type":["number"],"help":"","inlineHelp":"The elapsed time calculated for the physics motion updates. In a stable 60fps system this will be 0.016 every frame.","line":88,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"timeCap","type":["number"],"help":"","inlineHelp":"If the difference in time between two frame updates exceeds this value, the frame time is reset to avoid huge elapsed counts.","line":98,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"timeToCall","type":["number"],"help":"","inlineHelp":"The value that setTimeout needs to work out when to next update","line":113,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[{"name":"elapsed","type":["number"],"help":"","inlineHelp":"Elapsed time since the last frame (in ms).","line":44,"default":null,"public":false,"protected":true,"private":false,"readOnly":false},{"name":"fps","type":["number"],"help":"","inlineHelp":"Frames per second. Only calculated if Time.advancedTiming is true.","line":62,"default":null,"public":false,"protected":true,"private":false,"readOnly":false},{"name":"now","type":["number"],"help":"","inlineHelp":"The time right now.","line":38,"default":null,"public":false,"protected":true,"private":false,"readOnly":false},{"name":"pausedTime","type":["number"],"help":"","inlineHelp":"Records how long the game has been paused for. Is reset each time the game pauses.","line":50,"default":null,"public":false,"protected":true,"private":false,"readOnly":false},{"name":"prevTime","type":["number"],"help":"","inlineHelp":"The time the previous update occurred.","line":32,"default":null,"public":false,"protected":true,"private":false,"readOnly":false},{"name":"time","type":["number"],"help":"","inlineHelp":"Game time counter. If you need a value for in-game calculation please use Phaser.Time.now instead.","line":26,"default":null,"public":false,"protected":true,"private":false,"readOnly":false}],"private":[{"name":"_i","type":["number"],"help":"","inlineHelp":"Temp. array counter variable.","line":165,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_justResumed","type":["boolean"],"help":"","inlineHelp":"Internal value used to recover from the game pause state.","line":147,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_len","type":["number"],"help":"","inlineHelp":"Temp. array length variable.","line":159,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_pauseStarted","type":["number"],"help":"","inlineHelp":"The time the game started being paused.","line":141,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_started","type":["number"],"help":"","inlineHelp":"The time at which the Game instance started.","line":129,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_timeLastSecond","type":["number"],"help":"","inlineHelp":"The time (in ms) that the last second counter ticked over.","line":135,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_timers","type":["array"],"help":"","inlineHelp":"Internal store of Phaser.Timer objects.","line":153,"default":null,"public":false,"protected":false,"private":true,"readOnly":false}]}} |