1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-25 08:13:45 +00:00

Polished Week 4 light post code.

This commit is contained in:
Eric Myllyoja 2022-07-24 14:44:17 -04:00
parent 600c7e5441
commit 2760a9ae9a
2 changed files with 14 additions and 0 deletions

View file

@ -174,6 +174,8 @@ class Stage extends FlxSpriteGroup implements IHook implements IPlayStateScripte
propSprite.x = dataProp.position[0];
propSprite.y = dataProp.position[1];
propSprite.alpha = dataProp.alpha;
// If pixel, disable antialiasing.
propSprite.antialiasing = !dataProp.isPixel;

View file

@ -181,6 +181,7 @@ class StageDataParser
static final DEFAULT_CAMERA_OFFSETS_DAD:Array<Float> = [150, -100];
static final DEFAULT_POSITION:Array<Float> = [0, 0];
static final DEFAULT_SCALE:Float = 1.0;
static final DEFAULT_ALPHA:Float = 1.0;
static final DEFAULT_SCROLL:Array<Float> = [0, 0];
static final DEFAULT_ZINDEX:Int = 0;
@ -283,6 +284,11 @@ class StageDataParser
inputProp.scroll = DEFAULT_SCROLL;
}
if (inputProp.alpha == null)
{
inputProp.alpha = DEFAULT_ALPHA;
}
if (Std.isOfType(inputProp.scroll, Float))
{
inputProp.scroll = [inputProp.scroll, inputProp.scroll];
@ -442,6 +448,12 @@ typedef StageDataProp =
*/
var scale:OneOfTwo<Float, Array<Float>>;
/**
* The alpha of the prop, as a float.
* @default 1.0
*/
var alpha:Null<Float>;
/**
* If not zero, this prop will play an animation every X beats of the song.
* This requires animations to be defined. If `danceLeft` and `danceRight` are defined,