THORNS AND EVIL MAN

This commit is contained in:
Cameron Taylor 2021-02-02 00:48:22 -05:00
parent f3cfad693b
commit 9e0a40f29a
20 changed files with 511 additions and 21 deletions

View File

@ -12,4 +12,5 @@ bf-christmas
gf-christmas
monster
bf-pixel
senpai
senpai
spirit

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="animatedEvilSchool.png">
<!-- Created with Adobe Animate version 20.0.0.17400 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="background 2 instance 10000" x="0" y="0" width="513" height="512"/>
<SubTexture name="background 2 instance 10001" x="523" y="0" width="513" height="512"/>
<SubTexture name="background 2 instance 10002" x="1046" y="0" width="513" height="512"/>
<SubTexture name="background 2 instance 10003" x="1569" y="0" width="513" height="512"/>
<SubTexture name="background 2 instance 10004" x="2092" y="0" width="513" height="512"/>
<SubTexture name="background 2 instance 10005" x="2615" y="0" width="513" height="512"/>
<SubTexture name="background 2 instance 10006" x="3138" y="0" width="513" height="512"/>
<SubTexture name="background 2 instance 10007" x="0" y="522" width="513" height="512"/>
<SubTexture name="background 2 instance 10008" x="523" y="522" width="513" height="512"/>
<SubTexture name="background 2 instance 10009" x="1046" y="522" width="513" height="512"/>
<SubTexture name="background 2 instance 10010" x="1569" y="522" width="513" height="512"/>
<SubTexture name="background 2 instance 10011" x="2092" y="522" width="513" height="512"/>
<SubTexture name="background 2 instance 10012" x="2615" y="522" width="513" height="512"/>
<SubTexture name="background 2 instance 10013" x="3138" y="522" width="513" height="512"/>
<SubTexture name="background 2 instance 10014" x="0" y="1044" width="513" height="512"/>
<SubTexture name="background 2 instance 10015" x="523" y="1044" width="513" height="512"/>
<SubTexture name="background 2 instance 10016" x="1046" y="1044" width="513" height="512"/>
<SubTexture name="background 2 instance 10017" x="1569" y="1044" width="513" height="512"/>
<SubTexture name="background 2 instance 10018" x="2092" y="1044" width="513" height="512"/>
<SubTexture name="background 2 instance 10019" x="2615" y="1044" width="513" height="512"/>
<SubTexture name="background 2 instance 10020" x="3138" y="1044" width="513" height="512"/>
<SubTexture name="background 2 instance 10021" x="0" y="1566" width="513" height="512"/>
<SubTexture name="background 2 instance 10022" x="523" y="1566" width="513" height="512"/>
<SubTexture name="background 2 instance 10023" x="1046" y="1566" width="513" height="512"/>
<SubTexture name="background 2 instance 10024" x="1569" y="1566" width="513" height="512"/>
<SubTexture name="background 2 instance 10025" x="2092" y="1566" width="513" height="512"/>
<SubTexture name="background 2 instance 10026" x="2615" y="1566" width="513" height="512"/>
<SubTexture name="background 2 instance 10027" x="3138" y="1566" width="513" height="512"/>
<SubTexture name="background 2 instance 10028" x="0" y="2088" width="513" height="512"/>
<SubTexture name="background 2 instance 10029" x="523" y="2088" width="513" height="512"/>
<SubTexture name="background 2 instance 10030" x="1046" y="2088" width="513" height="512"/>
<SubTexture name="background 2 instance 10031" x="1569" y="2088" width="513" height="512"/>
<SubTexture name="background 2 instance 10032" x="2092" y="2088" width="513" height="512"/>
<SubTexture name="background 2 instance 10033" x="2615" y="2088" width="513" height="512"/>
<SubTexture name="background 2 instance 10034" x="3138" y="2088" width="513" height="512"/>
<SubTexture name="background 2 instance 10035" x="0" y="2610" width="513" height="512"/>
<SubTexture name="background 2 instance 10036" x="523" y="2610" width="513" height="512"/>
<SubTexture name="background 2 instance 10037" x="1046" y="2610" width="513" height="512"/>
<SubTexture name="background 2 instance 10038" x="1569" y="2610" width="513" height="512"/>
<SubTexture name="background 2 instance 10039" x="2092" y="2610" width="513" height="512"/>
</TextureAtlas>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

View File

@ -0,0 +1,100 @@
idle spirit_0 = 0 1028 128 128
idle spirit_1 = 0 1157 128 128
idle spirit_2 = 1542 0 128 128
idle spirit_3 = 643 900 128 128
idle spirit_4 = 387 1029 128 128
idle spirit_5 = 772 771 128 128
idle spirit_6 = 129 1415 128 128
idle spirit_7 = 258 1286 128 128
idle spirit_8 = 0 1544 128 128
idle spirit_9 = 387 1158 128 128
idle spirit_10 = 129 1028 128 128
idle spirit_11 = 514 771 128 128
idle spirit_12 = 129 1157 128 128
idle spirit_13 = 258 1028 128 128
idle spirit_14 = 0 1286 128 128
idle spirit_15 = 514 900 128 128
idle spirit_16 = 643 771 128 128
idle spirit_17 = 0 1415 128 128
idle spirit_18 = 129 1286 128 128
idle spirit_19 = 258 1157 128 128
spirit down_0 = 0 0 256 256
spirit down_1 = 257 0 256 256
spirit down_2 = 771 514 256 256
spirit down_3 = 1028 257 256 256
spirit down_4 = 1285 0 256 256
spirit down_5 = 1285 257 256 256
spirit down_6 = 1028 514 256 256
spirit down_7 = 1285 514 256 256
spirit down_8 = 0 771 256 256
spirit down_9 = 257 771 256 256
spirit down_10 = 514 0 256 256
spirit down_11 = 0 257 256 256
spirit down_12 = 257 257 256 256
spirit down_13 = 0 514 256 256
spirit down_14 = 257 514 256 256
spirit down_15 = 514 257 256 256
spirit down_16 = 514 514 256 256
spirit down_17 = 771 0 256 256
spirit down_18 = 771 257 256 256
spirit down_19 = 1028 0 256 256
left_0 = 516 1029 128 128
left_1 = 1542 129 128 128
left_10 = 772 900 128 128
left_11 = 901 771 128 128
left_12 = 258 1415 128 128
left_13 = 129 1544 128 128
left_14 = 387 1287 128 128
left_15 = 645 1029 128 128
left_16 = 516 1158 128 128
left_17 = 1542 258 128 128
left_18 = 1030 771 128 128
left_19 = 901 900 128 128
left_2 = 258 1544 128 128
left_3 = 516 1287 128 128
left_4 = 387 1416 128 128
left_5 = 645 1158 128 128
left_6 = 774 1029 128 128
left_7 = 1542 387 128 128
left_8 = 1030 900 128 128
left_9 = 1159 771 128 128
right_0 = 903 1029 128 128
right_1 = 774 1158 128 128
right_2 = 1032 1029 128 128
right_3 = 1542 645 128 128
right_4 = 1288 900 128 128
right_5 = 774 1416 128 128
right_6 = 1032 1158 128 128
right_7 = 903 1287 128 128
right_8 = 1161 1029 128 128
right_9 = 645 1545 128 128
right_10 = 516 1416 128 128
right_11 = 387 1545 128 128
right_12 = 645 1287 128 128
right_13 = 1542 516 128 128
right_14 = 1288 771 128 128
right_15 = 1159 900 128 128
right_16 = 645 1416 128 128
right_17 = 516 1545 128 128
right_18 = 774 1287 128 128
right_19 = 903 1158 128 128
up_0 = 1417 774 128 128
up_1 = 903 1416 128 128
up_2 = 1419 1032 128 128
up_3 = 1548 903 128 128
up_4 = 1290 1287 128 128
up_5 = 1161 1416 128 128
up_6 = 1032 1545 128 128
up_7 = 1548 1032 128 128
up_8 = 1419 1161 128 128
up_9 = 1161 1545 128 128
up_10 = 1290 1029 128 128
up_11 = 1161 1158 128 128
up_12 = 774 1545 128 128
up_13 = 1032 1287 128 128
up_14 = 1546 774 128 128
up_15 = 903 1545 128 128
up_16 = 1161 1287 128 128
up_17 = 1032 1416 128 128
up_18 = 1290 1158 128 128
up_19 = 1419 903 128 128

BIN
assets/music/Lunchbox.mp3 Normal file

Binary file not shown.

BIN
assets/music/Lunchbox.ogg Normal file

Binary file not shown.

BIN
assets/sounds/clickText.mp3 Normal file

Binary file not shown.

BIN
assets/sounds/clickText.ogg Normal file

Binary file not shown.

View File

@ -422,6 +422,27 @@ class Character extends FlxSprite
antialiasing = false;
case 'spirit':
frames = FlxAtlasFrames.fromSpriteSheetPacker('assets/images/weeb/spirit.png', 'assets/images/weeb/spirit.txt');
animation.addByPrefix('idle', "idle spirit_", 24, false);
animation.addByPrefix('singUP', "up_", 24, false);
animation.addByPrefix('singRIGHT', "right_", 24, false);
animation.addByPrefix('singLEFT', "left_", 24, false);
animation.addByPrefix('singDOWN', "spirit down_", 24, false);
addOffset('idle', -220, -280);
addOffset('singUP', -220, -240);
addOffset("singRIGHT", -220, -280);
addOffset("singLEFT", -200, -280);
addOffset("singDOWN", 170, 110);
setGraphicSize(Std.int(width * 6));
updateHitbox();
playAnim('idle');
antialiasing = false;
case 'parents-christmas':
frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/mom_dad_christmas_assets.png',
'assets/images/christmas/mom_dad_christmas_assets.xml');

View File

@ -31,12 +31,16 @@ class DialogueBox extends FlxSpriteGroup
var portraitRight:FlxSprite;
var handSelect:FlxSprite;
var bgFade:FlxSprite;
public function new(talkingRight:Bool = true, ?dialogueList:Array<String>)
{
super();
var bgFade:FlxSprite = new FlxSprite(-200, -200).makeGraphic(Std.int(FlxG.width * 1.3), Std.int(FlxG.height * 1.3), 0xFFB3DFd8);
FlxG.sound.playMusic('assets/music/Lunchbox' + TitleState.soundExt, 0);
FlxG.sound.music.fadeIn(1, 0, 0.8);
bgFade = new FlxSprite(-200, -200).makeGraphic(Std.int(FlxG.width * 1.3), Std.int(FlxG.height * 1.3), 0xFFB3DFd8);
bgFade.scrollFactor.set();
bgFade.alpha = 0;
add(bgFade);
@ -130,10 +134,31 @@ class DialogueBox extends FlxSpriteGroup
{
remove(dialogue);
FlxG.sound.play('assets/sounds/clickText' + TitleState.soundExt, 0.8);
if (dialogueList[1] == null)
{
finishThing();
kill();
if (!isEnding)
{
isEnding = true;
FlxG.sound.music.fadeOut(2.2, 0);
new FlxTimer().start(0.2, function(tmr:FlxTimer)
{
box.alpha -= 1 / 5;
bgFade.alpha -= 1 / 5 * 0.7;
portraitLeft.visible = false;
portraitRight.visible = false;
swagDialogue.alpha -= 1 / 5;
dropText.alpha = swagDialogue.alpha;
}, 5);
new FlxTimer().start(1.2, function(tmr:FlxTimer)
{
finishThing();
kill();
});
}
}
else
{
@ -145,6 +170,8 @@ class DialogueBox extends FlxSpriteGroup
super.update(elapsed);
}
var isEnding:Bool = false;
function startDialogue():Void
{
cleanDialog();
@ -155,7 +182,7 @@ class DialogueBox extends FlxSpriteGroup
// swagDialogue.text = ;
swagDialogue.resetText(dialogueList[0]);
swagDialogue.start(0.02, true);
swagDialogue.start(0.04, true);
switch (curCharacter)
{

View File

@ -22,6 +22,7 @@ class HealthIcon extends FlxSprite
animation.add('face', [10, 11], 0, false, isPlayer);
animation.add('dad', [12, 13], 0, false, isPlayer);
animation.add('senpai', [22, 22], 0, false, isPlayer);
animation.add('spirit', [23, 23], 0, false, isPlayer);
animation.add('bf-old', [14, 15], 0, false, isPlayer);
animation.add('gf', [16], 0, false, isPlayer);
animation.add('parents-christmas', [17], 0, false, isPlayer);

View File

@ -6,6 +6,8 @@ import flixel.math.FlxMath;
import flixel.util.FlxColor;
import polymod.format.ParseRules.TargetSignatureElement;
using StringTools;
class Note extends FlxSprite
{
public var strumTime:Float = 0;
@ -75,6 +77,32 @@ class Note extends FlxSprite
setGraphicSize(Std.int(width * PlayState.daPixelZoom));
updateHitbox();
case 'schoolEvil': // COPY PASTED CUZ I AM LAZY
loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17);
animation.add('greenScroll', [6]);
animation.add('redScroll', [7]);
animation.add('blueScroll', [5]);
animation.add('purpleScroll', [4]);
if (isSustainNote)
{
loadGraphic('assets/images/weeb/pixelUI/arrowEnds.png', true, 7, 6);
animation.add('purpleholdend', [4]);
animation.add('greenholdend', [6]);
animation.add('redholdend', [7]);
animation.add('blueholdend', [5]);
animation.add('purplehold', [0]);
animation.add('greenhold', [2]);
animation.add('redhold', [3]);
animation.add('bluehold', [1]);
}
setGraphicSize(Std.int(width * PlayState.daPixelZoom));
updateHitbox();
default:
frames = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml');
@ -139,7 +167,7 @@ class Note extends FlxSprite
x -= width / 2;
if (PlayState.curStage == 'school')
if (PlayState.curStage.startsWith('school'))
x += 30;
if (prevNote.isSustainNote)

View File

@ -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)

133
source/WiggleEffect.hx Normal file
View File

@ -0,0 +1,133 @@
package;
// STOLEN FROM HAXEFLIXEL DEMO LOL
import flixel.system.FlxAssets.FlxShader;
enum WiggleEffectType
{
DREAMY;
WAVY;
HEAT_WAVE_HORIZONTAL;
HEAT_WAVE_VERTICAL;
FLAG;
}
class WiggleEffect
{
public var shader(default, null):WiggleShader = new WiggleShader();
public var effectType(default, set):WiggleEffectType = DREAMY;
public var waveSpeed(default, set):Float = 0;
public var waveFrequency(default, set):Float = 0;
public var waveAmplitude(default, set):Float = 0;
public function new():Void
{
shader.uTime.value = [0];
}
public function update(elapsed:Float):Void
{
shader.uTime.value[0] += elapsed;
}
function set_effectType(v:WiggleEffectType):WiggleEffectType
{
effectType = v;
shader.effectType.value = [WiggleEffectType.getConstructors().indexOf(Std.string(v))];
return v;
}
function set_waveSpeed(v:Float):Float
{
waveSpeed = v;
shader.uSpeed.value = [waveSpeed];
return v;
}
function set_waveFrequency(v:Float):Float
{
waveFrequency = v;
shader.uFrequency.value = [waveFrequency];
return v;
}
function set_waveAmplitude(v:Float):Float
{
waveAmplitude = v;
shader.uWaveAmplitude.value = [waveAmplitude];
return v;
}
}
class WiggleShader extends FlxShader
{
@:glFragmentSource('
#pragma header
//uniform float tx, ty; // x,y waves phase
uniform float uTime;
const int EFFECT_TYPE_DREAMY = 0;
const int EFFECT_TYPE_WAVY = 1;
const int EFFECT_TYPE_HEAT_WAVE_HORIZONTAL = 2;
const int EFFECT_TYPE_HEAT_WAVE_VERTICAL = 3;
const int EFFECT_TYPE_FLAG = 4;
uniform int effectType;
/**
* How fast the waves move over time
*/
uniform float uSpeed;
/**
* Number of waves over time
*/
uniform float uFrequency;
/**
* How much the pixels are going to stretch over the waves
*/
uniform float uWaveAmplitude;
vec2 sineWave(vec2 pt)
{
float x = 0.0;
float y = 0.0;
if (effectType == EFFECT_TYPE_DREAMY)
{
float offsetX = sin(pt.y * uFrequency + uTime * uSpeed) * uWaveAmplitude;
pt.x += offsetX; // * (pt.y - 1.0); // <- Uncomment to stop bottom part of the screen from moving
}
else if (effectType == EFFECT_TYPE_WAVY)
{
float offsetY = sin(pt.x * uFrequency + uTime * uSpeed) * uWaveAmplitude;
pt.y += offsetY; // * (pt.y - 1.0); // <- Uncomment to stop bottom part of the screen from moving
}
else if (effectType == EFFECT_TYPE_HEAT_WAVE_HORIZONTAL)
{
x = sin(pt.x * uFrequency + uTime * uSpeed) * uWaveAmplitude;
}
else if (effectType == EFFECT_TYPE_HEAT_WAVE_VERTICAL)
{
y = sin(pt.y * uFrequency + uTime * uSpeed) * uWaveAmplitude;
}
else if (effectType == EFFECT_TYPE_FLAG)
{
y = sin(pt.y * uFrequency + 10.0 * pt.x + uTime * uSpeed) * uWaveAmplitude;
x = sin(pt.x * uFrequency + 5.0 * pt.y + uTime * uSpeed) * uWaveAmplitude;
}
return vec2(pt.x + x, pt.y + y);
}
void main()
{
vec2 uv = sineWave(openfl_TextureCoordv);
gl_FragColor = texture2D(bitmap, uv);
}')
public function new()
{
super();
}
}