package ;

import flixel.FlxG;
class Clock
{
	public var time(default,null):Float;
	public var dt(default,null):Float;

	public function new()
	{
		time = 0;
		dt = 0;
	}

	public function update()
	{
		dt = FlxG.elapsed;
		time += FlxG.elapsed;
	}

	public function getFlashing(numTimePerSecond:Float, onPhase:Float=0.5):Bool
	{
		return ((time * numTimePerSecond) % 1.0) < onPhase;
	}
}
