You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 23:16:20 +00:00
Move to Renderer V2
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { Motion } from './Motion';
|
||||
|
||||
export class Callback extends Motion
|
||||
{
|
||||
protected _callback: Function;
|
||||
|
||||
constructor(k: Function)
|
||||
{
|
||||
super(null);
|
||||
|
||||
this._callback = k;
|
||||
}
|
||||
|
||||
public get running(): boolean
|
||||
{
|
||||
return (this._running && !!this._callback);
|
||||
}
|
||||
|
||||
public tick(k: number): void
|
||||
{
|
||||
super.tick(k);
|
||||
|
||||
if(this._callback)
|
||||
{
|
||||
this._callback();
|
||||
|
||||
this._callback = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user