Skip to content

Add .just_started (or equivalent) to Timer #6356

Open
@torsteingrindvik

Description

@torsteingrindvik

What problem does this solve or what need does it fill?

Hypothetical:

I have an event happen, such as some collision event.
I have N timers, which I then query and .reset().

I might have some systems which depend on some of these timers.
I'd want to know when these timers start, such that I can react to them (e.g. start sound effect, add buff to creature, etc.).

Timer already has .just_finished, which is nice in order to reverse/stop the added effect (or buff, ...).

What solution would you like?

Add .just_started (or similar name) to Timer.

What alternative(s) have you considered?

Just react to each timer in the location where .reset() is used.
This gets uglier the more timers there are, and it couples the functionality of the Timer to the thing that depends on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-TimeInvolves time keeping and reportingC-FeatureA new feature, making something new possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions