mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-23 13:48:23 +00:00
color util (with just one function lol)
This commit is contained in:
parent
06389cb5cd
commit
34e93fa95a
22
source/funkin/util/FlxColorUtil.hx
Normal file
22
source/funkin/util/FlxColorUtil.hx
Normal file
|
@ -0,0 +1,22 @@
|
|||
package funkin.util;
|
||||
|
||||
import flixel.util.FlxColor;
|
||||
|
||||
/**
|
||||
* Non inline FlxColor functions for use in hscript files
|
||||
*/
|
||||
class FlxColorUtil
|
||||
{
|
||||
/**
|
||||
* Get an interpolated color based on two different colors.
|
||||
*
|
||||
* @param Color1 The first color
|
||||
* @param Color2 The second color
|
||||
* @param Factor Value from 0 to 1 representing how much to shift Color1 toward Color2
|
||||
* @return The interpolated color
|
||||
*/
|
||||
public static function interpolate(Color1:FlxColor, Color2:FlxColor, Factor:Float = 0.5):FlxColor
|
||||
{
|
||||
return FlxColor.interpolate(Color1, Color2, Factor);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue