THORNS AND EVIL MAN
This commit is contained in:
@ -2,6 +2,7 @@ package;
|
||||
|
||||
import Section.SwagSection;
|
||||
import Song.SwagSong;
|
||||
import WiggleEffect.WiggleEffectType;
|
||||
import flixel.FlxBasic;
|
||||
import flixel.FlxCamera;
|
||||
import flixel.FlxG;
|
||||
@ -11,6 +12,10 @@ import flixel.FlxSprite;
|
||||
import flixel.FlxState;
|
||||
import flixel.FlxSubState;
|
||||
import flixel.addons.display.FlxGridOverlay;
|
||||
import flixel.addons.effects.FlxTrail;
|
||||
import flixel.addons.effects.FlxTrailArea;
|
||||
import flixel.addons.effects.chainable.FlxEffectSprite;
|
||||
import flixel.addons.effects.chainable.FlxWaveEffect;
|
||||
import flixel.graphics.atlas.FlxAtlas;
|
||||
import flixel.graphics.frames.FlxAtlasFrames;
|
||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||
@ -30,6 +35,7 @@ import flixel.util.FlxTimer;
|
||||
import haxe.Json;
|
||||
import lime.utils.Assets;
|
||||
import openfl.display.BlendMode;
|
||||
import openfl.display.StageQuality;
|
||||
import openfl.filters.ShaderFilter;
|
||||
|
||||
using StringTools;
|
||||
@ -97,6 +103,7 @@ class PlayState extends MusicBeatState
|
||||
var santa:FlxSprite;
|
||||
|
||||
var bgGirls:BackgroundGirls;
|
||||
var wiggleShit:WiggleEffect = new WiggleEffect();
|
||||
|
||||
var talking:Bool = true;
|
||||
var songScore:Int = 0;
|
||||
@ -335,7 +342,7 @@ class PlayState extends MusicBeatState
|
||||
evilSnow.antialiasing = true;
|
||||
add(evilSnow);
|
||||
}
|
||||
else if (SONG.song.toLowerCase() == 'senpai' || SONG.song.toLowerCase() == 'roses' || SONG.song.toLowerCase() == 'thorns')
|
||||
else if (SONG.song.toLowerCase() == 'senpai' || SONG.song.toLowerCase() == 'roses')
|
||||
{
|
||||
curStage = 'school';
|
||||
|
||||
@ -397,6 +404,68 @@ class PlayState extends MusicBeatState
|
||||
bgGirls.updateHitbox();
|
||||
add(bgGirls);
|
||||
}
|
||||
else if (SONG.song.toLowerCase() == 'thorns')
|
||||
{
|
||||
curStage = 'schoolEvil';
|
||||
|
||||
var waveEffectBG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 3, 2);
|
||||
var waveEffectFG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 5, 2);
|
||||
|
||||
var posX = 400;
|
||||
var posY = 200;
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(posX, posY);
|
||||
bg.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/animatedEvilSchool.png', 'assets/images/weeb/animatedEvilSchool.xml');
|
||||
bg.animation.addByPrefix('idle', 'background 2', 24);
|
||||
bg.animation.play('idle');
|
||||
bg.scrollFactor.set(0.8, 0.9);
|
||||
bg.scale.set(6, 6);
|
||||
add(bg);
|
||||
|
||||
/*
|
||||
var bg:FlxSprite = new FlxSprite(posX, posY).loadGraphic('assets/images/weeb/evilSchoolBG.png');
|
||||
bg.scale.set(6, 6);
|
||||
// bg.setGraphicSize(Std.int(bg.width * 6));
|
||||
// bg.updateHitbox();
|
||||
add(bg);
|
||||
|
||||
var fg:FlxSprite = new FlxSprite(posX, posY).loadGraphic('assets/images/weeb/evilSchoolFG.png');
|
||||
fg.scale.set(6, 6);
|
||||
// fg.setGraphicSize(Std.int(fg.width * 6));
|
||||
// fg.updateHitbox();
|
||||
add(fg);
|
||||
|
||||
wiggleShit.effectType = WiggleEffectType.DREAMY;
|
||||
wiggleShit.waveAmplitude = 0.01;
|
||||
wiggleShit.waveFrequency = 60;
|
||||
wiggleShit.waveSpeed = 0.8;
|
||||
*/
|
||||
|
||||
// bg.shader = wiggleShit.shader;
|
||||
// fg.shader = wiggleShit.shader;
|
||||
|
||||
/*
|
||||
var waveSprite = new FlxEffectSprite(bg, [waveEffectBG]);
|
||||
var waveSpriteFG = new FlxEffectSprite(fg, [waveEffectFG]);
|
||||
|
||||
// Using scale since setGraphicSize() doesnt work???
|
||||
waveSprite.scale.set(6, 6);
|
||||
waveSpriteFG.scale.set(6, 6);
|
||||
waveSprite.setPosition(posX, posY);
|
||||
waveSpriteFG.setPosition(posX, posY);
|
||||
|
||||
waveSprite.scrollFactor.set(0.7, 0.8);
|
||||
waveSpriteFG.scrollFactor.set(0.9, 0.8);
|
||||
|
||||
// waveSprite.setGraphicSize(Std.int(waveSprite.width * 6));
|
||||
// waveSprite.updateHitbox();
|
||||
// waveSpriteFG.setGraphicSize(Std.int(fg.width * 6));
|
||||
// waveSpriteFG.updateHitbox();
|
||||
|
||||
add(waveSprite);
|
||||
add(waveSpriteFG);
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultCamZoom = 0.9;
|
||||
@ -439,6 +508,8 @@ class PlayState extends MusicBeatState
|
||||
gfVersion = 'gf-christmas';
|
||||
case 'school':
|
||||
gfVersion = 'gf-pixel';
|
||||
case 'schoolEvil':
|
||||
gfVersion = 'gf-pixel';
|
||||
}
|
||||
|
||||
if (curStage == 'limo')
|
||||
@ -446,14 +517,12 @@ class PlayState extends MusicBeatState
|
||||
|
||||
gf = new Character(400, 130, gfVersion);
|
||||
gf.scrollFactor.set(0.95, 0.95);
|
||||
add(gf);
|
||||
|
||||
// Shitty layering but whatev it works LOL
|
||||
if (curStage == 'limo')
|
||||
add(limo);
|
||||
|
||||
dad = new Character(100, 100, SONG.player2);
|
||||
add(dad);
|
||||
|
||||
var camPos:FlxPoint = new FlxPoint(dad.getGraphicMidpoint().x, dad.getGraphicMidpoint().y);
|
||||
|
||||
@ -485,10 +554,13 @@ class PlayState extends MusicBeatState
|
||||
dad.x += 150;
|
||||
dad.y += 360;
|
||||
camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y);
|
||||
case 'spirit':
|
||||
dad.x -= 150;
|
||||
dad.y += 100;
|
||||
camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y);
|
||||
}
|
||||
|
||||
boyfriend = new Boyfriend(770, 450, SONG.player1);
|
||||
add(boyfriend);
|
||||
|
||||
// REPOSITIONING PER STAGE
|
||||
switch (curStage)
|
||||
@ -507,12 +579,29 @@ class PlayState extends MusicBeatState
|
||||
boyfriend.x += 320;
|
||||
dad.y -= 80;
|
||||
case 'school':
|
||||
boyfriend.x += 200;
|
||||
boyfriend.y += 220;
|
||||
gf.x += 180;
|
||||
gf.y += 300;
|
||||
case 'schoolEvil':
|
||||
// trailArea.scrollFactor.set();
|
||||
|
||||
var evilTrail = new FlxTrail(dad, null, 4, 24, 0.3, 0.069);
|
||||
// evilTrail.changeValuesEnabled(false, false, false, false);
|
||||
// evilTrail.changeGraphic()
|
||||
add(evilTrail);
|
||||
// evilTrail.scrollFactor.set(1.1, 1.1);
|
||||
|
||||
boyfriend.x += 200;
|
||||
boyfriend.y += 220;
|
||||
gf.x += 180;
|
||||
gf.y += 300;
|
||||
}
|
||||
|
||||
add(gf);
|
||||
add(dad);
|
||||
add(boyfriend);
|
||||
|
||||
var doof:DialogueBox = new DialogueBox(false, dialogue);
|
||||
// doof.x += 70;
|
||||
// doof.y = FlxG.height * 0.5;
|
||||
@ -702,6 +791,11 @@ class PlayState extends MusicBeatState
|
||||
'weeb/pixelUI/set-pixel.png',
|
||||
'weeb/pixelUI/date-pixel.png'
|
||||
]);
|
||||
introAssets.set('schoolEvil', [
|
||||
'weeb/pixelUI/ready-pixel.png',
|
||||
'weeb/pixelUI/set-pixel.png',
|
||||
'weeb/pixelUI/date-pixel.png'
|
||||
]);
|
||||
|
||||
var introAlts:Array<String> = introAssets.get('default');
|
||||
var altSuffix:String = "";
|
||||
@ -725,7 +819,7 @@ class PlayState extends MusicBeatState
|
||||
ready.scrollFactor.set();
|
||||
ready.updateHitbox();
|
||||
|
||||
if (curStage == 'school')
|
||||
if (curStage.startsWith('school'))
|
||||
ready.setGraphicSize(Std.int(ready.width * daPixelZoom));
|
||||
|
||||
ready.screenCenter();
|
||||
@ -742,7 +836,7 @@ class PlayState extends MusicBeatState
|
||||
var set:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[1]);
|
||||
set.scrollFactor.set();
|
||||
|
||||
if (curStage == 'school')
|
||||
if (curStage.startsWith('school'))
|
||||
set.setGraphicSize(Std.int(set.width * daPixelZoom));
|
||||
|
||||
set.screenCenter();
|
||||
@ -759,7 +853,7 @@ class PlayState extends MusicBeatState
|
||||
var go:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[2]);
|
||||
go.scrollFactor.set();
|
||||
|
||||
if (curStage == 'school')
|
||||
if (curStage.startsWith('school'))
|
||||
go.setGraphicSize(Std.int(go.width * daPixelZoom));
|
||||
|
||||
go.updateHitbox();
|
||||
@ -945,6 +1039,43 @@ class PlayState extends MusicBeatState
|
||||
babyArrow.animation.add('confirm', [12, 16], 24, false);
|
||||
}
|
||||
|
||||
case 'schoolEvil':
|
||||
// ALL THIS IS COPY PASTED CUZ IM LAZY
|
||||
|
||||
babyArrow.loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17);
|
||||
babyArrow.animation.add('green', [6]);
|
||||
babyArrow.animation.add('red', [7]);
|
||||
babyArrow.animation.add('blue', [5]);
|
||||
babyArrow.animation.add('purplel', [4]);
|
||||
|
||||
babyArrow.setGraphicSize(Std.int(babyArrow.width * daPixelZoom));
|
||||
babyArrow.updateHitbox();
|
||||
babyArrow.antialiasing = false;
|
||||
|
||||
switch (Math.abs(i))
|
||||
{
|
||||
case 2:
|
||||
babyArrow.x += Note.swagWidth * 2;
|
||||
babyArrow.animation.add('static', [2]);
|
||||
babyArrow.animation.add('pressed', [6, 10], 12, false);
|
||||
babyArrow.animation.add('confirm', [14, 18], 12, false);
|
||||
case 3:
|
||||
babyArrow.x += Note.swagWidth * 3;
|
||||
babyArrow.animation.add('static', [3]);
|
||||
babyArrow.animation.add('pressed', [7, 11], 12, false);
|
||||
babyArrow.animation.add('confirm', [15, 19], 24, false);
|
||||
case 1:
|
||||
babyArrow.x += Note.swagWidth * 1;
|
||||
babyArrow.animation.add('static', [1]);
|
||||
babyArrow.animation.add('pressed', [5, 9], 12, false);
|
||||
babyArrow.animation.add('confirm', [13, 17], 24, false);
|
||||
case 0:
|
||||
babyArrow.x += Note.swagWidth * 0;
|
||||
babyArrow.animation.add('static', [0]);
|
||||
babyArrow.animation.add('pressed', [4, 8], 12, false);
|
||||
babyArrow.animation.add('confirm', [12, 16], 24, false);
|
||||
}
|
||||
|
||||
default:
|
||||
babyArrow.frames = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml');
|
||||
babyArrow.animation.addByPrefix('green', 'arrowUP');
|
||||
@ -1082,7 +1213,6 @@ class PlayState extends MusicBeatState
|
||||
trainFrameTiming = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// phillyCityLights.members[curLight].alpha -= (Conductor.crochet / 1000) * FlxG.elapsed;
|
||||
}
|
||||
|
||||
@ -1214,6 +1344,9 @@ class PlayState extends MusicBeatState
|
||||
case 'school':
|
||||
camFollow.x = boyfriend.getMidpoint().x - 200;
|
||||
camFollow.y = boyfriend.getMidpoint().y - 200;
|
||||
case 'schoolEvil':
|
||||
camFollow.x = boyfriend.getMidpoint().x - 200;
|
||||
camFollow.y = boyfriend.getMidpoint().y - 200;
|
||||
}
|
||||
|
||||
if (SONG.song.toLowerCase() == 'tutorial')
|
||||
@ -1507,7 +1640,7 @@ class PlayState extends MusicBeatState
|
||||
var pixelShitPart1:String = "";
|
||||
var pixelShitPart2:String = '';
|
||||
|
||||
if (curStage == 'school')
|
||||
if (curStage.startsWith('school'))
|
||||
{
|
||||
pixelShitPart1 = 'weeb/pixelUI/';
|
||||
pixelShitPart2 = '-pixel';
|
||||
@ -1530,7 +1663,7 @@ class PlayState extends MusicBeatState
|
||||
comboSpr.velocity.x += FlxG.random.int(1, 10);
|
||||
add(rating);
|
||||
|
||||
if (curStage != 'school')
|
||||
if (!curStage.startsWith('school'))
|
||||
{
|
||||
rating.setGraphicSize(Std.int(rating.width * 0.7));
|
||||
rating.antialiasing = true;
|
||||
@ -1560,7 +1693,7 @@ class PlayState extends MusicBeatState
|
||||
numScore.x = coolText.x + (43 * daLoop) - 90;
|
||||
numScore.y += 80;
|
||||
|
||||
if (curStage != 'school')
|
||||
if (!curStage.startsWith('school'))
|
||||
{
|
||||
numScore.antialiasing = true;
|
||||
numScore.setGraphicSize(Std.int(numScore.width * 0.5));
|
||||
@ -1795,7 +1928,7 @@ class PlayState extends MusicBeatState
|
||||
spr.animation.play('static');
|
||||
}
|
||||
|
||||
if (spr.animation.curAnim.name == 'confirm' && curStage != 'school')
|
||||
if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school'))
|
||||
{
|
||||
spr.centerOffsets();
|
||||
spr.offset.x -= 13;
|
||||
@ -2029,6 +2162,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
override function beatHit()
|
||||
{
|
||||
wiggleShit.update(Conductor.crochet);
|
||||
super.beatHit();
|
||||
|
||||
if (generatedMusic)
|
||||
|
Reference in New Issue
Block a user