···1111 * ...
1212 * @author ninjaMuffin
1313 */
1414-class Bullet extends FlxSprite
1414+class Bullet extends FlxSprite
1515{
1616 private var life:Float = 3;
1717+1718 public var speed:Float;
1819 public var dir:Int;
1920 public var damage:Float;
2020-2121- public function new(?X:Float=0, ?Y:Float=0, Speed:Float, Direction:Int, Damage:Float)
2121+2222+ public function new(?X:Float = 0, ?Y:Float = 0, Speed:Float, Direction:Int, Damage:Float)
2223 {
2324 super(X, Y);
2424-2525- makeGraphic(32, 20, FlxColor.BLACK);
2626-2525+2626+ makeGraphic(32, 20);
2727+2728 speed = Speed;
2829 dir = Direction;
2930 damage = Damage;
3030-3131+3132 velocity.y = FlxG.random.float(-25, 25);
3233 }
3333-3434- override public function update(elapsed:Float):Void
3434+3535+ override public function update(elapsed:Float):Void
3536 {
3637 super.update(elapsed);
3737-3838+3839 if (dir == FlxObject.LEFT)
3940 {
4041 velocity.x = -speed;
···4344 {
4445 velocity.x = speed;
4546 }
4646-4747+4748 life -= FlxG.elapsed;
4849 if (life < 0)
4950 {
5051 kill();
5152 }
5252-5353 }
5454-5555-}5454+}
+46-59
source/Enemy.hx
···1414class Enemy extends FlxSprite
1515{
1616 private var bulletArray:FlxTypedGroup<Bullet>;
1717+1718 public var justShot:Bool = false;
1919+1820 private var rateOfFire:Int = 6;
1921 private var fireCoutner:Int = 0;
2222+2023 public var xPos:Float = 0;
2121-2424+2225 private var knockBack:Float = 3;
2323-2424-2626+2527 private var whiteNess:Float = 0;
2828+2629 public var justThought:Bool = false;
3030+2731 private var thoughtTimer:Float = 4;
2828-3232+2933 public var rndDistance:Int = FlxG.random.int(16, 90);
3034 public var rndAccel:Float = FlxG.random.float(400, 850);
3135 public var rndDrag:Float = FlxG.random.float(900, 1800);
3232-3636+3337 public var canJump:Bool = false;
3434-3838+3539 public var finalSection:Bool = false;
3636-3737- public static var colorArray:Array<Int> =
3838- [
3939- 0xFFFF67B0,
4040- 0xFFFF7D67,
4141- 0xFFFFF067,
4242- 0xFFC6FF67,
4343- 0xFF67EAFF,
4444- 0xFF679AFF
4545- ];
4646-4747- public function new(?X:Float=0, ?Y:Float=0, enemyBulletArray:FlxTypedGroup<Bullet>)
4040+4141+ public static var colorArray:Array<Int> = [0xFFFF67B0, 0xFFFF7D67, 0xFFFFF067, 0xFFC6FF67, 0xFF67EAFF, 0xFF679AFF];
4242+4343+ public function new(?X:Float = 0, ?Y:Float = 0, enemyBulletArray:FlxTypedGroup<Bullet>)
4844 {
4945 super(X, Y);
5046 makeGraphic(64, 64);
5151- color = FlxColor.WHITE;
4747+ color = FlxColor.BLACK;
5248 drag.x = rndDrag;
5349 maxVelocity.x = FlxG.random.float(240, 300);
5454-5050+5551 bulletArray = enemyBulletArray;
5652 }
5757-5858- override public function update(elapsed:Float):Void
5353+5454+ override public function update(elapsed:Float):Void
5955 {
6056 super.update(elapsed);
6161-5757+6258 if (y >= 1800 && !finalSection)
6359 {
6460 finalSection = true;
6565-6161+6662 makeGraphic(FlxG.random.int(30, 130), FlxG.random.int(30, 130));
6763 updateHitbox();
6868-6464+6965 color = FlxG.random.getObject(colorArray);
7070-6666+7167 drag.x *= 0.1;
7268 }
7373-7474-6969+7570 canJump = isTouching(FlxObject.FLOOR);
7676-7171+7772 if (velocity.x > 0)
7873 {
7974 facing = FlxObject.RIGHT;
···8277 {
8378 facing = FlxObject.LEFT;
8479 }
8585-8080+8681 if (!finalSection)
8782 {
8883 whiteCheck();
8984 }
9090-9191-8585+9286 if (finalSection)
9387 {
9488 movement();
9589 }
9696-9090+9791 if (justThought)
9892 {
9993 thoughtTimer -= FlxG.elapsed;
···10397 thoughtTimer = 4;
10498 }
10599 }
106106-107107- if (color == FlxColor.BLACK && !finalSection)
100100+101101+ if (color == FlxColor.WHITE && !finalSection)
108102 {
109103 shooting();
110104 }
111111-112105 }
113113-106106+114107 private var idleTmr:Float = 3;
115115-108108+116109 private function movement():Void
117110 {
118111 if (idleTmr <= 0)
···123116 }
124117 else
125118 {
126126- velocity.x = FlxG.random.float( -rndAccel, rndAccel);
127127-119119+ velocity.x = FlxG.random.float(-rndAccel, rndAccel);
128120 }
129129-121121+130122 idleTmr = FlxG.random.float(1, 4);
131131-132123 }
133124 else
134125 {
135126 idleTmr -= FlxG.elapsed;
136127 }
137128 }
138138-129129+139130 private function shooting():Void
140131 {
141141-142132 justShot = false;
143133 if (FlxG.keys.pressed.SPACE)
144134 {
···149139 {
150140 FlxG.sound.play("assets/sounds/bullet" + FlxG.random.int(1, 3) + ".ogg", 0.5);
151141 }
152152-142142+153143 fireCoutner = 0;
154144 attack();
155145 justShot = true;
156146 }
157147 }
158148 }
159159-149149+160150 private function attack():Void
161151 {
162162- switch (facing)
152152+ switch (facing)
163153 {
164154 case FlxObject.RIGHT:
165155 xPos = x + 54;
···170160 default:
171161 throw("OOPSIE WOOPSIE!! Uwu We madea fucky wucky!! A wittle fucko boingo! The code monkeys at our headquarters are working VEWY HAWD to fix this!");
172162 }
173173-163163+174164 var newBullet = new Bullet(xPos, y + 32, 1600, facing, 10);
175165 bulletArray.add(newBullet);
176176-177166 }
178178-179179-167167+180168 public function hit():Void
181169 {
182170 whiteNess += FlxG.random.float(0, 0.2);
···186174 {
187175 if (whiteNess > 1)
188176 {
189189- color = FlxColor.BLACK;
177177+ color = FlxColor.WHITE;
190178 }
191179 else if (whiteNess > 0.9)
192180 {
193193- color = 0xFF101010;
181181+ color = 0xFFBBBBBB;
194182 }
195183 else if (whiteNess > 0.8)
196184 {
197197- color = 0xFF333333;
185185+ color = 0xFF999999;
198186 }
199187 else if (whiteNess > 0.6)
200188 {
···202190 }
203191 else if (whiteNess > 0.4)
204192 {
205205- color = 0xFF999999;
193193+ color = 0xFF333333;
206194 }
207195 else if (whiteNess > 0.2)
208196 {
209209- color = 0xFFBBBBBB;
210210- }
197197+ color = 0xFF101010;
198198+ }
211199 }
212212-213213-}200200+}
+76-121
source/PlayState.hx
···77import flixel.FlxState;
88import flixel.addons.editors.ogmo.FlxOgmoLoader;
99import flixel.group.FlxGroup.FlxTypedGroup;
1010+import flixel.math.FlxMath;
1011import flixel.math.FlxRect;
1112import flixel.text.FlxText;
1213import flixel.tile.FlxTilemap;
1314import flixel.tweens.FlxEase;
1415import flixel.tweens.FlxTween;
1516import flixel.ui.FlxButton;
1616-import flixel.math.FlxMath;
1717import flixel.util.FlxColor;
18181919class PlayState extends FlxState
2020{
2121 private var _player:Player;
2222 private var playerBullets:FlxTypedGroup<Bullet>;
2323-2323+2424 private var _enemy:Enemy;
2525 private var _enemyThoughts:FlxTypedGroup<Thoughts>;
2626-2626+2727 private var _map:FlxOgmoLoader;
2828 private var _mWalls:FlxTilemap;
2929-2929+3030 private var _grpPeople:FlxTypedGroup<FlxSprite>;
3131 private var _grpEnemies:FlxTypedGroup<Enemy>;
3232 private var _grpText:FlxTypedGroup<FlxText>;
3333-3333+3434 private var wasdTxt:FlxText;
3535 private var _txtShoot:FlxText;
3636-3636+3737 override public function create():Void
3838 {
3939 FlxG.mouse.visible = false;
4040 FlxG.camera.bgColor = FlxColor.GRAY;
4141 FlxG.camera.fade(FlxColor.BLACK, 5, true);
4242 FlxG.sound.playMusic("assets/music/ambience.ogg", 0.5);
4343-4343+4444 _map = new FlxOgmoLoader(AssetPaths.level1__oel);
4545 _mWalls = _map.loadTilemap(AssetPaths.tiles__png, 32, 32, "Floors");
4646 _mWalls.setTileProperties(1, FlxObject.ANY);
4747 add(_mWalls);
4848-4848+4949 _grpPeople = new FlxTypedGroup<FlxSprite>();
5050 add(_grpPeople);
5151-5151+5252 _grpEnemies = new FlxTypedGroup<Enemy>();
5353 add(_grpEnemies);
5454-5454+5555 _grpText = new FlxTypedGroup<FlxText>();
5656 add(_grpText);
5757-5757+5858 playerBullets = new FlxTypedGroup<Bullet>();
5959 add(playerBullets);
6060-6060+6161 _enemyThoughts = new FlxTypedGroup<Thoughts>();
6262 add(_enemyThoughts);
6363-6363+6464 _player = new Player(20, 300, playerBullets);
6565 _grpPeople.add(_player);
6666-6666+6767 _map.loadEntities(placeEntities, "entities");
6868-6868+6969 FlxG.worldBounds.setSize(10000, 10000);
7070-7070+7171 wasdTxt = new FlxText(_player.x - 64, _player.y - 100, 0, "A & D == Move", 16);
7272- wasdTxt.color = FlxColor.BLACK;
7372 add(wasdTxt);
7474-7373+7574 _txtShoot = new FlxText(170, 720, 0, "Spacebar to shoot", 16);
7675 add(_txtShoot);
7776 _txtShoot.visible = false;
7878-7979-7777+8078 var barHeight:Float = 50;
8181-7979+8280 var cinemaBar:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, Std.int(barHeight), FlxColor.BLACK);
8383- //add(cinemaBar);
8181+ // add(cinemaBar);
8482 var cinemaBar2:FlxSprite = new FlxSprite(0, FlxG.height - barHeight).makeGraphic(FlxG.width, Std.int(barHeight), FlxColor.BLACK);
8585- //add(cinemaBar2);
8686-8383+ // add(cinemaBar2);
8484+8785 cinemaBar.scrollFactor.x = cinemaBar.scrollFactor.y = 0;
8886 cinemaBar2.scrollFactor.x = cinemaBar2.scrollFactor.y = 0;
8989-8787+9088 FlxG.camera.follow(_player, FlxCameraFollowStyle.SCREEN_BY_SCREEN, 0.25);
9189 FlxG.camera.snapToTarget();
9290 FlxG.camera.deadzone = FlxRect.get(0, cinemaBar.height, FlxG.width, cinemaBar2.y);
9393-9191+9492 _grpPeople.forEach(initPeople);
9593 _grpEnemies.forEach(initPeople);
9696-9494+9795 var vig:FlxSprite = new FlxSprite().loadGraphic("assets/images/vignetteresized.png", false, 640, 480);
9896 vig.scrollFactor.x = vig.scrollFactor.y = 0;
9997 vig.setGraphicSize(FlxG.width, FlxG.height);
10098 vig.updateHitbox();
10199 vig.alpha = 0.4;
102100 add(vig);
103103-104104- _grpText.forEach(changeColorintro);
105105-101101+106102 super.create();
107103 }
108108-104104+109105 private function placeEntities(entityName:String, entityData:Xml):Void
110106 {
111107 var x:Int = Std.parseInt(entityData.get("x"));
···127123 _grpText.add(textSpr);
128124 }
129125 }
130130-126126+131127 private function initPeople(p:FlxSprite):Void
132128 {
133129 p.acceleration.y = 600;
···137133 {
138134 super.update(elapsed);
139135 /*
140140- if (_player.x >= _txtShoot.x)
141141- {
142142- _txtShoot.visible = true;
143143- wasdTxt.visible = false;
144144- }
145145- */
136136+ if (_player.x >= _txtShoot.x)
137137+ {
138138+ _txtShoot.visible = true;
139139+ wasdTxt.visible = false;
140140+ }
141141+ */
146142 if (_player.justShot)
147143 {
148144 var flash:MuzzleFlash = new MuzzleFlash(_player.xPos, _player.y + 26);
149145 add(flash);
150150-146146+151147 FlxG.camera.shake(0.01, 0.1);
152148 }
153153-149149+154150 playerBullets.forEachAlive(collisionCheck);
155155-151151+156152 FlxG.collide(_grpPeople, _mWalls);
157153 FlxG.collide(_grpEnemies, _mWalls);
158158-154154+159155 _grpEnemies.forEachAlive(followCheck);
160160-156156+161157 if (_player.y >= 1800 && !finalLevel)
162158 {
163159 finalLevel = true;
164160 FlxG.camera.fade(FlxColor.WHITE, 0.05, false, finalFade);
165161 FlxG.sound.play("assets/sounds/colorSwap.ogg", 0.8);
166162 FlxG.sound.music.stop();
167167- _player.color = FlxG.random.getObject(Enemy.colorArray);
168163 }
169164 }
170170-165165+171166 private var finalLevel:Bool = false;
172172-167167+173168 private function enemyThink(e:Enemy, ?textOverride:String):Void
174169 {
175170 e.justThought = true;
176176-171171+177172 FlxG.sound.play("assets/sounds/pop" + FlxG.random.int(1, 3) + ".ogg", FlxG.random.float(0.5, 0.7));
178178-173173+179174 var thoughtText:String;
180180-175175+181176 if (e.finalSection)
182177 {
183178 thoughtText = thoughtArray[FlxG.random.int(0, thoughtArray.length)];
184179 }
185180 else
186181 {
187187- if (e.color == FlxColor.BLACK)
182182+ if (e.color == FlxColor.WHITE)
188183 {
189184 thoughtText = "insert same opinion here";
190185 }
···193188 thoughtText = "insert different opinion here";
194189 }
195190 }
196196-191191+197192 var thought:Thoughts = new Thoughts(e.x + FlxG.random.float(-100, 100), e.y - FlxG.random.float(10, 100), 150, thoughtText, 16);
198193 add(thought);
199199-194194+200195 if (e.finalSection)
201196 {
202202- thought.color = FlxColor.WHITE;
203203- }
204204- else
205205- {
206197 thought.color = FlxColor.BLACK;
207198 }
208208-199199+209200 if (textOverride != null)
210201 {
211202 thought.text = textOverride;
212203 }
213213-214214- FlxTween.tween(thought, {y: thought.y - FlxG.random.float(8, 15)}, 1.25, {ease:FlxEase.quartOut});
215215-204204+205205+ FlxTween.tween(thought, {y: thought.y - FlxG.random.float(8, 15)}, 1.25, {ease: FlxEase.quartOut});
216206 }
217217-207207+218208 private function followCheck(e:Enemy):Void
219209 {
220210 e.acceleration.x = 0;
221211 if (!e.finalSection)
222212 {
223223- if (e.y > _player.y && e.velocity.y == 0 && e.color == FlxColor.BLACK)
213213+ if (e.y > _player.y && e.velocity.y == 0 && e.color == FlxColor.WHITE)
224214 {
225215 e.velocity.y -= 360;
226216 }
227227-228228- if (e.color == FlxColor.BLACK)
217217+218218+ if (e.color == FlxColor.WHITE)
229219 {
230230-231220 if (FlxMath.distanceBetween(e, _player) >= e.rndDistance)
232221 {
233222 var accel:Float = e.rndAccel;
···242231 }
243232 }
244233 }
245245-234234+246235 if (FlxMath.distanceBetween(_player, e) < 94 && !e.justThought)
247236 {
248237 enemyThink(e);
249238 }
250250-251239 }
252252-240240+253241 private function collisionCheck(b:Bullet):Void
254242 {
255243 for (e in _grpEnemies.members)
256244 {
257257- if (FlxG.overlap(b, e) && e.color != FlxColor.BLACK)
245245+ if (FlxG.overlap(b, e) && e.color != FlxColor.WHITE)
258246 {
259247 e.hit();
260248 e.x += b.velocity.x * FlxG.random.float(0.001, 0.01);
261249 muzzFlash(b);
262250 }
263251 }
264264-252252+265253 if (FlxG.collide(b, _mWalls))
266254 {
267255 muzzFlash(b);
268256 }
269269-270257 }
271271-258258+272259 private function muzzFlash(b:Bullet):Void
273260 {
274261 var flash:MuzzleFlash = new MuzzleFlash(b.x, b.y);
275262 add(flash);
276276-263263+277264 b.kill();
278265 }
279279-266266+280267 private function finalFade():Void
281268 {
282269 FlxG.camera.fade(FlxColor.WHITE, 3, true);
283283- FlxG.camera.bgColor = FlxColor.BLACK;
270270+ FlxG.camera.bgColor = FlxColor.WHITE;
271271+ _player.color = Enemy.colorArray[FlxG.random.int(0, Enemy.colorArray.length)];
284272 FlxG.sound.playMusic("assets/music/SomewhatOKIDKLMAO_V2.ogg", 0.7);
285273 FlxG.sound.music.fadeIn(15, 0, 0.7);
286286-287287-274274+288275 _grpText.forEach(changeColor);
289276 }
290290-277277+291278 private function changeColor(t:FlxText):Void
292279 {
293293- t.color = FlxColor.WHITE;
294294- }
295295-296296-297297- private function changeColorintro(t:FlxText):Void
298298- {
299280 t.color = FlxColor.BLACK;
300281 }
301301-302302-303303- private var thoughtArray:Array<String> =
304304- [
305305- "I like anime a lot",
306306- "You know some pop music isn't that bad",
307307- "Crunchy peanut butter is alright",
308308- "Dogs are pretty alright",
309309- "Children are cool as hell",
310310- "Cats are cool",
311311- "Water is really better than soda",
312312- "La La Land was a good movie",
313313- "Carly Rae Jepsen music is my favourite",
314314- "I'm a bit obnoxious online because I'm kinda shy in person",
315315- "I envy others success",
316316- "I often feel under appreciated",
317317- "I don't like watching sports",
318318- "I love Newgrounds a LOT",
319319- "I feel guilty for not appreciating my heritage",
320320- "Videogames are the best",
321321- "I haven't watched anime for a while",
322322- "I miss my old home sometimes, even though it sucked",
323323- "The internet isn't as bad as many claim it is",
324324- "insert something political here",
325325- "My family is super cool",
326326- "Shoutouts to Simpleflips",
327327- "What kind of music do you like?",
328328- "Wait, this game wasn't about racism?",
329329- "I spend too much time on Twitter",
330330- "Hip hop, man that stuff's my jam!",
331331- "Hifumi from New Game is best waifu",
332332- "I don't really like berries",
333333- "High school was kinda alright",
334334- "Teens are alright",
335335- "Dogs are meh",
282282+283283+ private var thoughtArray:Array<String> = [
284284+ "I like anime a lot", "You know some pop music isn't that bad", "Crunchy peanut butter is alright", "Dogs are pretty alright",
285285+ "Children are cool as hell", "Cats are cool", "Water is really better than soda", "La La Land was a good movie",
286286+ "Carly Rae Jepsen music is my favourite", "I'm a bit obnoxious online because I'm kinda shy in person", "I envy others success",
287287+ "I often feel under appreciated", "I don't like watching sports", "I love Newgrounds a LOT", "I feel guilty for not appreciating my heritage",
288288+ "Videogames are the best", "I haven't watched anime for a while", "I miss my old home sometimes, even though it sucked",
289289+ "The internet isn't as bad as many claim it is", "insert something political here", "My family is super cool", "Shoutouts to Simpleflips",
290290+ "What kind of music do you like?", "Wait, this game wasn't about racism?", "I spend too much time on Twitter", "Hip hop, man that stuff's my jam!",
291291+ "Hifumi from New Game is best waifu", "I don't really like berries", "High school was kinda alright", "Teens are alright", "Dogs are meh",
336292 "Buzzfeed is alright nowadays"
337293 ];
338338-339339-}294294+}
+37-40
source/Player.hx
···1313 * ...
1414 * @author ninjaMuffin
1515 */
1616-class Player extends FlxSprite
1616+class Player extends FlxSprite
1717{
1818 private var bulletArray:FlxTypedGroup<Bullet>;
1919+1920 public var justShot:Bool = false;
2121+2022 private var rateOfFire:Int = 6;
2123 private var fireCoutner:Int = 0;
2424+2225 public var xPos:Float = 0;
2323-2626+2427 private var knockBack:Float = 3;
2525-2828+2629 private var accel:Float = 3000;
2727-3030+2831 public var justThought:Bool = false;
3232+2933 private var thoughtTimer:Float = 4;
3034 private var walkTmr:Float = 0.2;
3135 private var prevStep:Int = 1;
32363333- public function new(?X:Float=0, ?Y:Float=0, playerBulletArray:FlxTypedGroup<Bullet>)
3737+ public function new(?X:Float = 0, ?Y:Float = 0, playerBulletArray:FlxTypedGroup<Bullet>)
3438 {
3539 super(X, Y);
3640 makeGraphic(64, 64);
3737-4141+3842 maxVelocity.x = 300;
3943 drag.x = 1400;
4040-4444+4145 bulletArray = playerBulletArray;
4242- color = FlxColor.BLACK;
4646+ color = FlxColor.WHITE;
4347 }
4444-4545- override public function update(elapsed:Float):Void
4848+4949+ override public function update(elapsed:Float):Void
4650 {
4751 controls();
4848-5252+4953 super.update(elapsed);
5050-5151-5454+5255 if (justThought)
5356 {
5457 thoughtTimer -= FlxG.elapsed;
···5962 }
6063 }
6164 }
6262-6565+6366 private function controls():Void
6467 {
6568 var _left:Bool = FlxG.keys.anyPressed([A, LEFT]);
6669 var _right:Bool = FlxG.keys.anyPressed([D, RIGHT]);
6770 var _upP:Bool = FlxG.keys.anyJustPressed([W, UP]);
6868-7171+6972 var _shift:Bool = FlxG.keys.anyPressed([SHIFT, X]);
7070-7373+7174 var canJump:Bool = isTouching(FlxObject.FLOOR);
7272-7575+7376 if (_shift)
7477 {
7578 maxVelocity.x = 450;
···7881 {
7982 maxVelocity.x = 300;
8083 }
8181-8484+8285 if (_left && _right)
8386 {
8487 _left = _right = false;
8588 }
8686-8989+8790 if (_upP && canJump)
8891 {
8989- FlxTween.tween(scale, {x: 0.8, y: 1.2}, 0.3, {ease:FlxEase.quadOut}).then(FlxTween.tween(scale, {x: 1, y: 1}, 0.5, {ease:FlxEase.quadInOut}));
9292+ FlxTween.tween(scale, {x: 0.8, y: 1.2}, 0.3, {ease: FlxEase.quadOut}).then(FlxTween.tween(scale, {x: 1, y: 1}, 0.5, {ease: FlxEase.quadInOut}));
9093 velocity.y -= 360;
9194 }
9292-9595+9396 acceleration.x = 0;
9494-9797+9598 if (_left || _right)
9699 {
97100 walkTmr -= FlxG.elapsed;
9898-101101+99102 if (walkTmr <= 0 && isTouching(FlxObject.FLOOR) && velocity.x != 0)
100103 {
101104 walkTmr = FlxG.random.float(0.3, 0.36);
102105 prevStep = FlxG.random.int(1, 4, [prevStep]);
103106 FlxG.sound.play("assets/sounds/walk" + Std.string(prevStep) + ".ogg");
104107 }
105105-108108+106109 if (_left)
107110 {
108111 acceleration.x = -accel;
109109-112112+110113 facing = FlxObject.LEFT;
111114 }
112115 if (_right)
113116 {
114117 acceleration.x = accel;
115115-118118+116119 facing = FlxObject.RIGHT;
117120 }
118121 }
119119-120120-121121- if (color == FlxColor.BLACK)
122122+123123+ if (color == FlxColor.WHITE)
122124 {
123123- shooting();
125125+ shooting();
124126 }
125127 }
126126-128128+127129 private function shooting():Void
128130 {
129129-130131 justShot = false;
131132 if (FlxG.keys.pressed.SPACE)
132133 {
···140141 }
141142 }
142143 }
143143-144144-145145-144144+146145 private function attack():Void
147146 {
148148- switch (facing)
147147+ switch (facing)
149148 {
150149 case FlxObject.RIGHT:
151150 xPos = x + 54;
···156155 default:
157156 throw("OOPSIE WOOPSIE!! Uwu We madea fucky wucky!! A wittle fucko boingo! The code monkeys at our headquarters are working VEWY HAWD to fix this!");
158157 }
159159-158158+160159 var newBullet = new Bullet(xPos, y + 32, 1600, facing, 10);
161160 bulletArray.add(newBullet);
162162-163161 }
164164-165165-}162162+}