{"id":15061035,"url":"https://github.com/phasereditor2d/phasereditor2d-scripts-timer","last_synced_at":"2025-07-28T20:09:44.931Z","repository":{"id":211717228,"uuid":"726442002","full_name":"PhaserEditor2D/phasereditor2d-scripts-timer","owner":"PhaserEditor2D","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-11T01:20:47.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-27T10:05:57.271Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PhaserEditor2D.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG.MD","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-02T12:11:43.000Z","updated_at":"2023-12-10T12:21:04.000Z","dependencies_parsed_at":"2024-01-11T04:16:27.555Z","dependency_job_id":"f4715d83-2a4b-4c81-a475-0867fc5c3f11","html_url":"https://github.com/PhaserEditor2D/phasereditor2d-scripts-timer","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"fb319c08860372628d55189144a3284238fa61cc"},"previous_names":["phasereditor2d/phasereditor2d-scripts-timer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/PhaserEditor2D/phasereditor2d-scripts-timer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhaserEditor2D%2Fphasereditor2d-scripts-timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhaserEditor2D%2Fphasereditor2d-scripts-timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhaserEditor2D%2Fphasereditor2d-scripts-timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhaserEditor2D%2Fphasereditor2d-scripts-timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhaserEditor2D","download_url":"https://codeload.github.com/PhaserEditor2D/phasereditor2d-scripts-timer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhaserEditor2D%2Fphasereditor2d-scripts-timer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267578003,"owners_count":24110351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T23:08:30.622Z","updated_at":"2025-07-28T20:09:44.913Z","avatar_url":"https://github.com/PhaserEditor2D.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phaser Editor 2D Timer Scripts (library)\n\nThis project contains Phaser Editor 2D scripts for using a timer.\n\nThese script nodes are very basic and may fit on any Phaser Editor 2D project.\n\nThe scripts are coded in TypeScript with ES modules.\n\n## Installing (NPM)\n\nThis package depends on the following packages:\n\n- `@phasereditor2d/scripts-core`\n- `@phasereditor2d/scripts-random`\n\nTo install this in your game you have to install dependencies too:\n\n```\nnpm install @phasereditor2d/scripts-core\nnpm install @phasereditor2d/scripts-random\nnpm install @phasereditor2d/scripts-timer\n```\n\nAlso, you should add this package to the `phasereditor2d.config.json` file in your project, in the `scripts` section:\n\n```json\n{\n    \"scripts\": [\n        \"@phasereditor2d/scripts-core\",\n        \"@phasereditor2d/scripts-random\",\n        \"@phasereditor2d/scripts-timer\"\n    ]\n}\n```\n\n## Installing (vanilla JavaScript)\n\n* Get the files in the [browser](./browser/) folder and copy them into your JavaScript project. It includes Phaser Editor 2D files, JavaScript files, and TypeScript type definitions.\n* Add a `script` tag to the `index.html` file to load the `lib/phasereditor2d_scripts_timer.js` file.\n\n## Summary\n\nThis library provides a few actions for implementing timers in your game. \n\nAs a reminder, an action is executed by an event script or another action.\n\nThe actions:\n\n* **Delay Action** - Delays, then executes the children's scripts.\n* **Delay Random Action** - Delays a random time, then executes the children's\n* **Emit Tick Action** - Emits a tick at every given delay.\n* **Emit Random Tick Action** - Emits a tick always at a random delay.\n\n## Delay Action\n\n*Class: DelayActionScript*\n\nThis action delays a given **Delay** time and then executes the children's scripts.\n\nThis action allows the **Target Action Config** user component.\n\n## Delay Random Action\n\n*Class: DelayRandomActionScript*\n\nThis action delays a random time and then executes the children's scripts.\n\nThe delay is a random value generated by any of the random user component configurations in the [@phasereditor2d/scripts-random](https://github.com/PhaserEditor2D/phasereditor2d-scripts-random) library.\n\n\nThis action allows the **Target Action Config** user component.\n\n## Emit Tick Action Script\n\n*Class: EmitTickActionScript*\n\nThis action emits a tick at a fixed rate, within the given **Delay**. At every tick, it executes the children's scripts.\n\nThis action allows the **Target Action Config** user component.\n\n## Emit Random Tick Action\n\n*Class: EmitRandomTickActionScript*\n\nThis action emits a tick at a random rate. At every tick, it executes the children's scripts.\n\nThe delay is a random value generated by any of the random user component configurations in the [@phasereditor2d/scripts-random](https://github.com/PhaserEditor2D/phasereditor2d-scripts-random) library.\n\nThis action allows the **Target Action Config** user component.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphasereditor2d%2Fphasereditor2d-scripts-timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphasereditor2d%2Fphasereditor2d-scripts-timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphasereditor2d%2Fphasereditor2d-scripts-timer/lists"}