npm.io
1.0.1 • Published 9 years ago

playcanvas-timeout

Licence
ISC
Version
1.0.1
Deps
1
Vulns
0
Weekly
0

Introduction

A setTimeout equivalent that operates in PlayCanvas game time, that might be slowed or paused.

Installation

npm install --save playcanvas-timeout
Usage
import timeout form 'playcanvas-timeout'

...

timeout(function() {
    //Called after 1 second of GAME TIME
    ...
}, 1000); 
 
Requirements

Requires PlayCanvas Engine to be running on the page. Uses ES6/Babel/PlayCanvas template.

Keywords