Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ghosts copy antialias from the main sprite #16

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions source/gameObjects/Character.hx
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,6 @@ class Character extends FlxSprite
{
super(x, y);

for(i in 0...4){
var ghost = new FlxSprite();
ghost.visible = false;
ghost.antialiasing = true;
ghost.alpha = 0.6;
doubleGhosts.push(ghost);
}

#if (haxe >= "4.0.0")
animOffsets = new Map();
#else
Expand All @@ -148,6 +140,14 @@ class Character extends FlxSprite
curCharacter = (ClientPrefs.darnell /*&& FlxG.save.data.KUTValue == 2*/) ? 'darnell' : character;
this.isPlayer = isPlayer;
antialiasing = ClientPrefs.globalAntialiasing;

for(i in 0...4){
var ghost = new FlxSprite();
ghost.visible = false;
ghost.alpha = 0.6;
doubleGhosts.push(ghost);
}

var library:String = null;
switch (curCharacter)
{
Expand Down Expand Up @@ -544,6 +544,7 @@ class Character extends FlxSprite
ghost.flipX = flipX;
ghost.flipY = flipY;
ghost.alpha = alpha * 0.6;
ghost.antialiasing = antialiasing;
ghost.visible = true;
ghost.color = FlxColor.fromRGB(healthColorArray[0], healthColorArray[1], healthColorArray[2]);
ghost.animation.play(AnimName, Force, Reversed, Frame);
Expand Down Expand Up @@ -585,4 +586,4 @@ class Character extends FlxSprite
else
ghost.offset.set(0, 0);
}
}
}