mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-03-21 09:29:41 +00:00
SHADER SHIT FOR EVIL SCHOOL LOL!
This commit is contained in:
parent
144a526f1c
commit
713a3dd623
|
@ -435,7 +435,28 @@ class PlayState extends MusicBeatState
|
|||
bgGirls.updateHitbox();
|
||||
add(bgGirls);
|
||||
case 'thorns':
|
||||
loadStage('schoolEvil');
|
||||
// loadStage('schoolEvil');
|
||||
curStage = 'schoolEvil';
|
||||
|
||||
var schoolBG:FlxSprite = new FlxSprite(-200, 0).loadGraphic(Paths.image('weeb/evilSchoolBG'));
|
||||
wiggleShit.waveAmplitude = 0.02;
|
||||
wiggleShit.waveSpeed = 2;
|
||||
wiggleShit.waveFrequency = 4;
|
||||
schoolBG.shader = wiggleShit.shader;
|
||||
schoolBG.setGraphicSize(Std.int(schoolBG.width * 6));
|
||||
schoolBG.updateHitbox();
|
||||
// schoolBG.scale.set(6, 6);
|
||||
add(schoolBG);
|
||||
|
||||
schoolBG.scrollFactor.set(0.7, 1);
|
||||
|
||||
var schoolFront:FlxSprite = new FlxSprite(-250, schoolBG.y + 20).loadGraphic(Paths.image('weeb/evilSchoolFG'));
|
||||
|
||||
schoolFront.shader = wiggleShit.shader;
|
||||
|
||||
schoolFront.setGraphicSize(Std.int(schoolFront.width * 6));
|
||||
schoolFront.updateHitbox();
|
||||
add(schoolFront);
|
||||
|
||||
case 'guns' | 'stress' | 'ugh':
|
||||
loadStage('tank');
|
||||
|
@ -485,7 +506,7 @@ class PlayState extends MusicBeatState
|
|||
var fgTank3:BGSprite = new BGSprite('tank3', 1300, 1200, 3.5, 2.5, ['fg']);
|
||||
foregroundSprites.add(fgTank3);
|
||||
|
||||
case "darnell":
|
||||
case "week8Lol":
|
||||
loadStage('phillyStreets');
|
||||
|
||||
default:
|
||||
|
@ -1855,6 +1876,8 @@ class PlayState extends MusicBeatState
|
|||
|
||||
super.update(elapsed);
|
||||
|
||||
wiggleShit.update(elapsed);
|
||||
|
||||
scoreTxt.text = "Score:" + songScore;
|
||||
|
||||
var androidPause:Bool = false;
|
||||
|
@ -2969,7 +2992,6 @@ class PlayState extends MusicBeatState
|
|||
// Conductor.changeBPM(SONG.bpm);
|
||||
}
|
||||
// FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM);
|
||||
wiggleShit.update(Conductor.crochet);
|
||||
|
||||
// HARDCODING FOR MILF ZOOMS!
|
||||
|
||||
|
@ -3001,7 +3023,7 @@ class PlayState extends MusicBeatState
|
|||
{
|
||||
var animShit:ComboCounter = new ComboCounter(-100, 300, combo);
|
||||
animShit.scrollFactor.set(0.6, 0.6);
|
||||
add(animShit);
|
||||
// add(animShit);
|
||||
|
||||
var frameShit:Float = (1 / 24) * 2; // equals 2 frames in the animation
|
||||
|
||||
|
|
|
@ -96,8 +96,25 @@ class WiggleShader extends FlxShader
|
|||
|
||||
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
|
||||
|
||||
float w = 1 / openfl_TextureSize.y;
|
||||
float h = 1 / openfl_TextureSize.x;
|
||||
|
||||
// look mom, I know how to write shaders now
|
||||
|
||||
pt.x = floor(pt.x / h) * h;
|
||||
|
||||
float offsetX = sin(pt.x * uFrequency + uTime * uSpeed) * uWaveAmplitude;
|
||||
pt.y += floor(offsetX / w) * w; // * (pt.y - 1.0); // <- Uncomment to stop bottom part of the screen from moving
|
||||
|
||||
|
||||
pt.y = floor(pt.y / w) * w;
|
||||
|
||||
float offsetY = sin(pt.y * (uFrequency / 2.0) + uTime * (uSpeed / 2.0)) * (uWaveAmplitude / 2.0);
|
||||
pt.x += floor(offsetY / h) * h; // * (pt.y - 1.0); // <- Uncomment to stop bottom part of the screen from moving
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if (effectType == EFFECT_TYPE_WAVY)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue