You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
true); // pixel-perfect because we will be using a clipRect and need the extra checks
41
41
42
42
add(bg);
43
43
44
-
ammo=newFlxSprite(5, 223);
45
-
ammo.makeGraphic(40, 60, 0x0, true);
44
+
ammo=newFlxSprite(5*2, 223*2);
45
+
ammo.makeGraphic(40*2, 60*2, 0x0, true);
46
46
47
47
add(ammo);
48
48
49
49
// the original art files from Kenney.nl are in multiple pngs: I combined several using an image editor to make a spritesheet that I can easily load as an animation
50
50
// tools like TexturePacker do all that for you plus more: check out the TexturePackerDemo too!
@@ -107,7 +114,7 @@ class UILayer extends FlxSpriteGroup
107
114
// you could also manage separate sprites, each being one unit of ammo (photons?)
108
115
109
116
varcolor:FlxColor=0x0;
110
-
varrect=newRectangle(0, 0, 40, 20);
117
+
varrect=newRectangle(0, 0, 40*2, 20*2);
111
118
112
119
for (iin0...3)
113
120
{
@@ -116,7 +123,7 @@ class UILayer extends FlxSpriteGroup
116
123
else
117
124
color=FlxColor.BLACK;
118
125
119
-
rect.y=40-i*20;
126
+
rect.y=80-i*40;
120
127
121
128
ammo.pixels.fillRect(rect, color);
122
129
}
@@ -176,15 +183,15 @@ class UILayer extends FlxSpriteGroup
176
183
177
184
functiononPanelOver(target:FlxSprite):Void
178
185
{
179
-
clipRect.width=bg.width=250;
186
+
clipRect.width=bg.width=250*2;
180
187
clipRect=clipRect; // you have to set the clipRect for it to update, just changing a property doesn't do anything
181
188
182
189
source.visible=patreon.visible=credits.visible=true; // we don't want these responding to mouse clicks when covered up, so we have to manually set their visibility
Copy file name to clipboardExpand all lines: Arcade/FlxLightPuzzle/source/WinState.hx
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -17,12 +17,12 @@ class WinState extends FlxSubState
17
17
{
18
18
varbg=ColorMaps.defaultColorMap[Color.WHITE] ==FlxColor.BLACK?FlxColor.WHITE:FlxColor.BLACK; // if the background is black, we want white text, and vice-versa
19
19
20
-
winMessage=newFlxText(256, 40, 250,
20
+
winMessage=newFlxText(256*2, 40*2, 250*2,
21
21
"Want more?\n\nYou can copy the code to make more levels or change it however you want.\n\n"+
22
22
"This project is open source and released under MIT license thanks to HaxeFlixel supporters.\n\n"+
23
23
"Grab the code and become a HaxeFlixel supporter to help make more cool open-source demos like this.",
24
-
14);
25
-
winMessage.setFormat(null, 12, bg);
24
+
14*2);
25
+
winMessage.setFormat(null, 12*2, bg);
26
26
winMessage.alignment="center";
27
27
28
28
// delay to match up with the expanding circle background
0 commit comments