improve antialiasing option
i was tired when i made the original so i improved it.
This commit is contained in:
@ -535,10 +535,7 @@ class PlayState extends MusicBeatState
|
||||
halloweenBG.animation.addByPrefix('idle', 'halloweem bg0');
|
||||
halloweenBG.animation.addByPrefix('lightning', 'halloweem bg lightning strike', 24, false);
|
||||
halloweenBG.animation.play('idle');
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
halloweenBG.antialiasing = true;
|
||||
}
|
||||
halloweenBG.antialiasing = FlxG.save.data.antialiasing;
|
||||
add(halloweenBG);
|
||||
|
||||
isHalloween = true;
|
||||
@ -570,10 +567,7 @@ class PlayState extends MusicBeatState
|
||||
light.visible = false;
|
||||
light.setGraphicSize(Std.int(light.width * 0.85));
|
||||
light.updateHitbox();
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
light.antialiasing = true;
|
||||
}
|
||||
light.antialiasing = FlxG.save.data.antialiasing;
|
||||
phillyCityLights.add(light);
|
||||
}
|
||||
|
||||
@ -601,6 +595,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(Paths.image('limo/limoSunset', 'week4'));
|
||||
skyBG.scrollFactor.set(0.1, 0.1);
|
||||
skyBG.antialiasing = FlxG.save.data.antialiasing;
|
||||
add(skyBG);
|
||||
|
||||
var bgLimo:FlxSprite = new FlxSprite(-200, 480);
|
||||
@ -608,6 +603,7 @@ class PlayState extends MusicBeatState
|
||||
bgLimo.animation.addByPrefix('drive', "background limo pink", 24);
|
||||
bgLimo.animation.play('drive');
|
||||
bgLimo.scrollFactor.set(0.4, 0.4);
|
||||
bgLimo.antialiasing = FlxG.save.data.antialiasing;
|
||||
add(bgLimo);
|
||||
if (FlxG.save.data.distractions)
|
||||
{
|
||||
@ -638,12 +634,10 @@ class PlayState extends MusicBeatState
|
||||
limo.frames = limoTex;
|
||||
limo.animation.addByPrefix('drive', "Limo stage", 24);
|
||||
limo.animation.play('drive');
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
limo.antialiasing = true;
|
||||
}
|
||||
limo.antialiasing = FlxG.save.data.antialiasing;
|
||||
|
||||
fastCar = new FlxSprite(-300, 160).loadGraphic(Paths.image('limo/fastCarLol', 'week4'));
|
||||
fastCar.antialiasing = FlxG.save.data.antialiasing;
|
||||
// add(limo);
|
||||
}
|
||||
case 'mall':
|
||||
@ -653,10 +647,7 @@ class PlayState extends MusicBeatState
|
||||
defaultCamZoom = 0.80;
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(-1000, -500).loadGraphic(Paths.image('christmas/bgWalls', 'week5'));
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
bg.antialiasing = true;
|
||||
}
|
||||
bg.antialiasing = FlxG.save.data.antialiasing;
|
||||
bg.scrollFactor.set(0.2, 0.2);
|
||||
bg.active = false;
|
||||
bg.setGraphicSize(Std.int(bg.width * 0.8));
|
||||
@ -666,10 +657,7 @@ class PlayState extends MusicBeatState
|
||||
upperBoppers = new FlxSprite(-240, -90);
|
||||
upperBoppers.frames = Paths.getSparrowAtlas('christmas/upperBop', 'week5');
|
||||
upperBoppers.animation.addByPrefix('bop', "Upper Crowd Bob", 24, false);
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
upperBoppers.antialiasing = true;
|
||||
}
|
||||
upperBoppers.antialiasing = FlxG.save.data.antialiasing;
|
||||
upperBoppers.scrollFactor.set(0.33, 0.33);
|
||||
upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.85));
|
||||
upperBoppers.updateHitbox();
|
||||
@ -679,10 +667,7 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
|
||||
var bgEscalator:FlxSprite = new FlxSprite(-1100, -600).loadGraphic(Paths.image('christmas/bgEscalator', 'week5'));
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
bgEscalator.antialiasing = true;
|
||||
}
|
||||
bgEscalator.antialiasing = FlxG.save.data.antialiasing;
|
||||
bgEscalator.scrollFactor.set(0.3, 0.3);
|
||||
bgEscalator.active = false;
|
||||
bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.9));
|
||||
@ -690,20 +675,14 @@ class PlayState extends MusicBeatState
|
||||
add(bgEscalator);
|
||||
|
||||
var tree:FlxSprite = new FlxSprite(370, -250).loadGraphic(Paths.image('christmas/christmasTree', 'week5'));
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
tree.antialiasing = true;
|
||||
}
|
||||
tree.antialiasing = FlxG.save.data.antialiasing;
|
||||
tree.scrollFactor.set(0.40, 0.40);
|
||||
add(tree);
|
||||
|
||||
bottomBoppers = new FlxSprite(-300, 140);
|
||||
bottomBoppers.frames = Paths.getSparrowAtlas('christmas/bottomBop', 'week5');
|
||||
bottomBoppers.animation.addByPrefix('bop', 'Bottom Level Boppers', 24, false);
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
bottomBoppers.antialiasing = true;
|
||||
}
|
||||
bottomBoppers.antialiasing = FlxG.save.data.antialiasing;
|
||||
bottomBoppers.scrollFactor.set(0.9, 0.9);
|
||||
bottomBoppers.setGraphicSize(Std.int(bottomBoppers.width * 1));
|
||||
bottomBoppers.updateHitbox();
|
||||
@ -714,19 +693,13 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var fgSnow:FlxSprite = new FlxSprite(-600, 700).loadGraphic(Paths.image('christmas/fgSnow', 'week5'));
|
||||
fgSnow.active = false;
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
fgSnow.antialiasing = true;
|
||||
}
|
||||
fgSnow.antialiasing = FlxG.save.data.antialiasing;
|
||||
add(fgSnow);
|
||||
|
||||
santa = new FlxSprite(-840, 150);
|
||||
santa.frames = Paths.getSparrowAtlas('christmas/santa', 'week5');
|
||||
santa.animation.addByPrefix('idle', 'santa idle in fear', 24, false);
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
santa.antialiasing = true;
|
||||
}
|
||||
santa.antialiasing = FlxG.save.data.antialiasing;
|
||||
if (FlxG.save.data.distractions)
|
||||
{
|
||||
add(santa);
|
||||
@ -736,10 +709,7 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
curStage = 'mallEvil';
|
||||
var bg:FlxSprite = new FlxSprite(-400, -500).loadGraphic(Paths.image('christmas/evilBG', 'week5'));
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
bg.antialiasing = true;
|
||||
}
|
||||
bg.antialiasing = FlxG.save.data.antialiasing;
|
||||
bg.scrollFactor.set(0.2, 0.2);
|
||||
bg.active = false;
|
||||
bg.setGraphicSize(Std.int(bg.width * 0.8));
|
||||
@ -747,18 +717,12 @@ class PlayState extends MusicBeatState
|
||||
add(bg);
|
||||
|
||||
var evilTree:FlxSprite = new FlxSprite(300, -300).loadGraphic(Paths.image('christmas/evilTree', 'week5'));
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
evilTree.antialiasing = true;
|
||||
}
|
||||
evilTree.antialiasing = FlxG.save.data.antialiasing;
|
||||
evilTree.scrollFactor.set(0.2, 0.2);
|
||||
add(evilTree);
|
||||
|
||||
var evilSnow:FlxSprite = new FlxSprite(-200, 700).loadGraphic(Paths.image("christmas/evilSnow", 'week5'));
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
evilSnow.antialiasing = true;
|
||||
}
|
||||
evilSnow.antialiasing = FlxG.save.data.antialiasing;
|
||||
add(evilSnow);
|
||||
}
|
||||
case 'school':
|
||||
@ -898,10 +862,7 @@ class PlayState extends MusicBeatState
|
||||
defaultCamZoom = 0.9;
|
||||
curStage = 'stage';
|
||||
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('stageback'));
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
bg.antialiasing = true;
|
||||
}
|
||||
bg.antialiasing = FlxG.save.data.antialiasing;
|
||||
bg.scrollFactor.set(0.9, 0.9);
|
||||
bg.active = false;
|
||||
add(bg);
|
||||
@ -909,10 +870,7 @@ class PlayState extends MusicBeatState
|
||||
var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront'));
|
||||
stageFront.setGraphicSize(Std.int(stageFront.width * 1.1));
|
||||
stageFront.updateHitbox();
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
stageFront.antialiasing = true;
|
||||
}
|
||||
stageFront.antialiasing = FlxG.save.data.antialiasing;
|
||||
stageFront.scrollFactor.set(0.9, 0.9);
|
||||
stageFront.active = false;
|
||||
add(stageFront);
|
||||
@ -920,10 +878,7 @@ class PlayState extends MusicBeatState
|
||||
var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(Paths.image('stagecurtains'));
|
||||
stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9));
|
||||
stageCurtains.updateHitbox();
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
stageCurtains.antialiasing = true;
|
||||
}
|
||||
stageCurtains.antialiasing = FlxG.save.data.antialiasing;
|
||||
stageCurtains.scrollFactor.set(1.3, 1.3);
|
||||
stageCurtains.active = false;
|
||||
|
||||
@ -2077,10 +2032,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
babyArrow.x += Note.swagWidth * i;
|
||||
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
babyArrow.antialiasing = true;
|
||||
}
|
||||
babyArrow.antialiasing = FlxG.save.data.antialiasing;
|
||||
babyArrow.setGraphicSize(Std.int(babyArrow.width * 0.7));
|
||||
}
|
||||
|
||||
@ -3603,15 +3555,9 @@ class PlayState extends MusicBeatState
|
||||
if (!curStage.startsWith('school'))
|
||||
{
|
||||
rating.setGraphicSize(Std.int(rating.width * 0.7));
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
rating.antialiasing = true;
|
||||
}
|
||||
rating.antialiasing = FlxG.save.data.antialiasing;
|
||||
comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7));
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
comboSpr.antialiasing = true;
|
||||
}
|
||||
comboSpr.antialiasing = FlxG.save.data.antialiasing;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3660,10 +3606,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
if (!curStage.startsWith('school'))
|
||||
{
|
||||
if(FlxG.save.data.antialiasing)
|
||||
{
|
||||
numScore.antialiasing = true;
|
||||
}
|
||||
numScore.antialiasing = FlxG.save.data.antialiasing;
|
||||
numScore.setGraphicSize(Std.int(numScore.width * 0.5));
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user