Commit graph

32 commits

Author SHA1 Message Date
Richard Davey
fba997d75e If you create a repeating or looping TimerEvent with a delay of zero it will now throw a runtime error as it would lead to an infinite loop. Fix #6225 2022-09-29 15:02:02 +01:00
Richard Davey
59fbcc5ca3 Updated copyright year 2022-02-28 14:29:51 +00:00
samme
6219d27dbc Add TimerEvent methods
- getRemaining()
- getRemainingSeconds()
- getOverallRemaining()
- getOverallRemainingSeconds()
2020-11-11 12:05:14 -08:00
Richard Davey
ff65e69cd1 Changed copyright date to 2020 2020-01-15 12:07:09 +00:00
Richard Davey
8ecab7a1a1 JSDocs fix 2019-06-25 16:56:56 +01:00
Richard Davey
c91ed91ce3 License link update 2019-05-10 16:15:04 +01:00
Richard Davey
173652ea2b Time Types 2019-05-09 12:39:52 +01:00
Richard Davey
4fc817c519 Final batch of typedefs 2019-02-13 16:06:00 +00:00
J.C
cff904d74b doc fix: wrong argument type 2019-01-25 11:00:40 +08:00
Richard Davey
aa341854c7 Happy New Year 2019-01-15 16:20:22 +00:00
Richard Davey
4c4421c47f Docjam merge 2018-10-19 12:32:43 +01:00
Richard Davey
4b1c762296 Updated @memberOf to @memberof 2018-10-10 10:49:13 +01:00
Richard Davey
a9063604dc Replace @readOnly with @readonly 2018-10-09 13:40:00 +01:00
orblazer
ed1f2a7011 Fix wrong types 2018-03-22 13:51:30 +01:00
orblazer
90cf919b10 Fix "object" types on Sound and Time 2018-03-21 15:02:10 +01:00
migiyubi
174c982966 Fix TimerEvent.remove behaves opposite to what we expect 2018-03-09 19:47:45 +09:00
Richard Davey
d1f5f8a82b Added jsdocs 2018-02-12 16:01:21 +00:00
Richard Davey
502ebf7068 Added jsdocs 2018-02-10 02:31:42 +00:00
Artem Platonov
3e5a35d796 TimerEvent startAt field not scaled
A note regarding the feature `startAt` of `TimerEvent `

When an event gets added it should be either scaled by clock `timeScale`
as well or not scaled at all - depending on the feature purpose.

```javascript
// preUpdate loop
event.elapsed = event.startAt * event.timeScale
```

In my understanding it should not be influenced by `timeScale` at all.
As a developer I would use the feature of `startAt` to specify the exact
offset for my event.

In case I have looped `Timer` for one second and want to start the first
loop in the middle, I would set the `startAt` to half a second. And
scaling is applied during the timer run time as a factor of speed it
elapses.
2018-01-23 16:34:33 +01:00
Richard Davey
d8f1ba03e9 Moved repository location 2018-01-09 21:43:56 +00:00
Richard Davey
0d90f75b5f Splitting the dev branch up into versions. 2016-11-22 01:36:56 +00:00
Sean Irby
3c2003365d Update docstring for TimerEvent
I think the TimerEvent lifecycle could use some clarification so I updated the docstring to explain what happens when they are finished firing.
2016-06-02 17:47:31 -07:00
photonstorm
f40cfbe2ae 2015 - 2016. 2016-04-04 22:16:16 +01:00
thiagojobson
58817869dc Fixed links in documentation 2016-03-25 18:08:29 -03:00
photonstorm
a69e53f901 Copyright date change. 2015-02-25 03:36:23 +00:00
Paul
dab8772de0 Documentation - consistency updates
- Updated `readOnly` doclet to `readonly`

- `array` refined to `type[]`, where such information was immediately
determinable.

- Updated {Any}/{*} to {any}; {...*} is standard exception

- Udated {Object} to {object}
2014-11-30 04:03:35 -08:00
Paul
fb5a1b9946 TimerEvent - tabs to spaces
Converted tabs to spaces, for consistency
2014-11-27 23:57:42 -08:00
Paul
c5381f96ef Time/Time - documentation updates and minor cleanup
- Removed `Time.pausedTime`

  Time.pausedTime has not been used / updated since
  b255fea85f in Feb 2014.

  There might be a case to re-explore how pause time is
  reported/observable, possibly with a distinction of 'current' and 'last'
  and the semantics of such. For instance, pause duration is only updated
  after the resume occurs and reflects the duration-of-the-last-pause..

- Removed `Time` _i and _len properties These are better suited by local
  variables.

- General documentation updates.

- Marked several methods such as `Timer.order` as protected - there are
  advanced use-cases for them, but different user-facing methods and
  documentations are likely in order. Also marked `Timer.sortHandler` as
  private; but did not change any interfaces.
2014-11-27 23:54:42 -08:00
photonstorm
e5eea56c9b jsdoc updates. 2014-09-16 19:44:04 +01:00
photonstorm
68d5c73fea Explicitly paused Timer continues if you un-focus and focus the browser window.
Added TimerEvent.pendingDelete and checks in Timer.update, so that removing an event in a callback no longer throws an exception.
2014-02-05 22:35:35 +00:00
photonstorm
0896c2fac7 Updating copyright year and README. 2014-02-05 16:54:59 +00:00
photonstorm
c6c579e6b3 Phaser.Timer is now feature complete and fully documented. You can create Phaser.TimerEvents on a Timer and lots of new examples have been provided. 2014-01-09 00:59:37 +00:00