buncho dumbshti lol!!!
This commit is contained in:
@ -36,7 +36,6 @@ using StringTools;
|
||||
|
||||
class PlayState extends MusicBeatState
|
||||
{
|
||||
public static var curLevel:String = 'Tutorial';
|
||||
public static var curStage:String = '';
|
||||
public static var SONG:SwagSong;
|
||||
public static var isStoryMode:Bool = false;
|
||||
@ -97,6 +96,8 @@ class PlayState extends MusicBeatState
|
||||
var bottomBoppers:FlxSprite;
|
||||
var santa:FlxSprite;
|
||||
|
||||
var bgGirls:FlxSprite;
|
||||
|
||||
var talking:Bool = true;
|
||||
var songScore:Int = 0;
|
||||
var scoreTxt:FlxText;
|
||||
@ -105,6 +106,9 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var defaultCamZoom:Float = 1.05;
|
||||
|
||||
// how big to stretch the pixel art assets
|
||||
public static var daPixelZoom:Float = 6;
|
||||
|
||||
override public function create()
|
||||
{
|
||||
// var gameCam:FlxCamera = FlxG.camera;
|
||||
@ -121,7 +125,7 @@ class PlayState extends MusicBeatState
|
||||
persistentDraw = true;
|
||||
|
||||
if (SONG == null)
|
||||
SONG = Song.loadFromJson(curLevel);
|
||||
SONG = Song.loadFromJson('tutorial');
|
||||
|
||||
Conductor.changeBPM(SONG.bpm);
|
||||
|
||||
@ -340,6 +344,7 @@ class PlayState extends MusicBeatState
|
||||
add(bgSchool);
|
||||
|
||||
var bgStreet:FlxSprite = new FlxSprite(-200).loadGraphic('assets/images/weeb/weebStreet.png');
|
||||
bgStreet.scrollFactor.set(0.95, 0.95);
|
||||
add(bgStreet);
|
||||
|
||||
var widShit = Std.int(bgSky.width * 6);
|
||||
@ -392,6 +397,8 @@ class PlayState extends MusicBeatState
|
||||
gfVersion = 'gf-christmas';
|
||||
case 'mallEvil':
|
||||
gfVersion = 'gf-christmas';
|
||||
case 'school':
|
||||
gfVersion = 'gf-pixel';
|
||||
}
|
||||
|
||||
if (curStage == 'limo')
|
||||
@ -399,7 +406,6 @@ class PlayState extends MusicBeatState
|
||||
|
||||
gf = new Character(400, 130, gfVersion);
|
||||
gf.scrollFactor.set(0.95, 0.95);
|
||||
gf.antialiasing = true;
|
||||
add(gf);
|
||||
|
||||
// Shitty layering but whatev it works LOL
|
||||
@ -459,6 +465,8 @@ class PlayState extends MusicBeatState
|
||||
case 'school':
|
||||
boyfriend.x += 100;
|
||||
boyfriend.y += 100;
|
||||
gf.x += 100;
|
||||
gf.y += 200;
|
||||
}
|
||||
|
||||
var doof:DialogueBox = new DialogueBox(false, dialogue);
|
||||
@ -569,22 +577,49 @@ class PlayState extends MusicBeatState
|
||||
});
|
||||
});
|
||||
});
|
||||
case 'senpai':
|
||||
schoolIntro();
|
||||
default:
|
||||
startCountdown();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
startCountdown();
|
||||
switch (curSong.toLowerCase())
|
||||
{
|
||||
case 'senpai':
|
||||
schoolIntro();
|
||||
default:
|
||||
startCountdown();
|
||||
}
|
||||
}
|
||||
|
||||
#if lime
|
||||
trace("IT'S LIME");
|
||||
#end
|
||||
|
||||
super.create();
|
||||
}
|
||||
|
||||
function schoolIntro():Void
|
||||
{
|
||||
var black:FlxSprite = new FlxSprite(-100, -100).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK);
|
||||
black.scrollFactor.set();
|
||||
add(black);
|
||||
|
||||
new FlxTimer().start(0.3, function(tmr:FlxTimer)
|
||||
{
|
||||
black.alpha -= 0.15;
|
||||
if (!startedCountdown)
|
||||
startCountdown();
|
||||
|
||||
if (black.alpha > 0)
|
||||
{
|
||||
tmr.reset(0.3);
|
||||
}
|
||||
else
|
||||
{
|
||||
remove(black);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var startTimer:FlxTimer;
|
||||
var perfectMode:Bool = false;
|
||||
|
||||
@ -606,13 +641,35 @@ class PlayState extends MusicBeatState
|
||||
gf.dance();
|
||||
boyfriend.playAnim('idle');
|
||||
|
||||
var introAssets:Map<String, Array<String>> = new Map<String, Array<String>>();
|
||||
introAssets.set('default', ['ready.png', "set.png", "go.png"]);
|
||||
introAssets.set('school', [
|
||||
'weeb/pixelUI/ready-pixel.png',
|
||||
'weeb/pixelUI/set-pixel.png',
|
||||
'weeb/pixelUI/date-pixel.png'
|
||||
]);
|
||||
|
||||
var introAlts:Array<String> = introAssets.get('default');
|
||||
|
||||
for (value in introAssets.keys())
|
||||
{
|
||||
if (value == curStage)
|
||||
introAlts = introAssets.get(value);
|
||||
}
|
||||
|
||||
switch (swagCounter)
|
||||
|
||||
{
|
||||
case 0:
|
||||
FlxG.sound.play('assets/sounds/intro3' + TitleState.soundExt, 0.6);
|
||||
case 1:
|
||||
var ready:FlxSprite = new FlxSprite().loadGraphic('assets/images/ready.png');
|
||||
var ready:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[0]);
|
||||
ready.scrollFactor.set();
|
||||
ready.updateHitbox();
|
||||
|
||||
if (curStage == 'school')
|
||||
ready.setGraphicSize(Std.int(ready.width * daPixelZoom));
|
||||
|
||||
ready.screenCenter();
|
||||
add(ready);
|
||||
FlxTween.tween(ready, {y: ready.y += 100, alpha: 0}, Conductor.crochet / 1000, {
|
||||
@ -624,8 +681,12 @@ class PlayState extends MusicBeatState
|
||||
});
|
||||
FlxG.sound.play('assets/sounds/intro2' + TitleState.soundExt, 0.6);
|
||||
case 2:
|
||||
var set:FlxSprite = new FlxSprite().loadGraphic('assets/images/set.png');
|
||||
var set:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[1]);
|
||||
set.scrollFactor.set();
|
||||
|
||||
if (curStage == 'school')
|
||||
set.setGraphicSize(Std.int(set.width * daPixelZoom));
|
||||
|
||||
set.screenCenter();
|
||||
add(set);
|
||||
FlxTween.tween(set, {y: set.y += 100, alpha: 0}, Conductor.crochet / 1000, {
|
||||
@ -637,8 +698,14 @@ class PlayState extends MusicBeatState
|
||||
});
|
||||
FlxG.sound.play('assets/sounds/intro1' + TitleState.soundExt, 0.6);
|
||||
case 3:
|
||||
var go:FlxSprite = new FlxSprite().loadGraphic('assets/images/go.png');
|
||||
var go:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[2]);
|
||||
go.scrollFactor.set();
|
||||
|
||||
if (curStage == 'school')
|
||||
go.setGraphicSize(Std.int(go.width * daPixelZoom));
|
||||
|
||||
go.updateHitbox();
|
||||
|
||||
go.screenCenter();
|
||||
add(go);
|
||||
FlxTween.tween(go, {y: go.y += 100, alpha: 0}, Conductor.crochet / 1000, {
|
||||
@ -780,19 +847,83 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
for (i in 0...4)
|
||||
{
|
||||
FlxG.log.add(i);
|
||||
// FlxG.log.add(i);
|
||||
var babyArrow:FlxSprite = new FlxSprite(0, strumLine.y);
|
||||
var arrTex = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml');
|
||||
babyArrow.frames = arrTex;
|
||||
babyArrow.animation.addByPrefix('green', 'arrowUP');
|
||||
babyArrow.animation.addByPrefix('blue', 'arrowDOWN');
|
||||
babyArrow.animation.addByPrefix('purple', 'arrowLEFT');
|
||||
babyArrow.animation.addByPrefix('red', 'arrowRIGHT');
|
||||
|
||||
babyArrow.scrollFactor.set();
|
||||
babyArrow.setGraphicSize(Std.int(babyArrow.width * 0.7));
|
||||
switch (curStage)
|
||||
{
|
||||
case 'school':
|
||||
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');
|
||||
babyArrow.animation.addByPrefix('blue', 'arrowDOWN');
|
||||
babyArrow.animation.addByPrefix('purple', 'arrowLEFT');
|
||||
babyArrow.animation.addByPrefix('red', 'arrowRIGHT');
|
||||
|
||||
babyArrow.antialiasing = true;
|
||||
babyArrow.setGraphicSize(Std.int(babyArrow.width * 0.7));
|
||||
|
||||
switch (Math.abs(i))
|
||||
{
|
||||
case 2:
|
||||
babyArrow.x += Note.swagWidth * 2;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowUP');
|
||||
babyArrow.animation.addByPrefix('pressed', 'up press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'up confirm', 24, false);
|
||||
case 3:
|
||||
babyArrow.x += Note.swagWidth * 3;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowRIGHT');
|
||||
babyArrow.animation.addByPrefix('pressed', 'right press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'right confirm', 24, false);
|
||||
case 1:
|
||||
babyArrow.x += Note.swagWidth * 1;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowDOWN');
|
||||
babyArrow.animation.addByPrefix('pressed', 'down press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'down confirm', 24, false);
|
||||
case 0:
|
||||
babyArrow.x += Note.swagWidth * 0;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowLEFT');
|
||||
babyArrow.animation.addByPrefix('pressed', 'left press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'left confirm', 24, false);
|
||||
}
|
||||
}
|
||||
|
||||
babyArrow.updateHitbox();
|
||||
babyArrow.antialiasing = true;
|
||||
babyArrow.scrollFactor.set();
|
||||
|
||||
babyArrow.y -= 10;
|
||||
babyArrow.alpha = 0;
|
||||
@ -805,30 +936,6 @@ class PlayState extends MusicBeatState
|
||||
playerStrums.add(babyArrow);
|
||||
}
|
||||
|
||||
switch (Math.abs(i))
|
||||
{
|
||||
case 2:
|
||||
babyArrow.x += Note.swagWidth * 2;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowUP');
|
||||
babyArrow.animation.addByPrefix('pressed', 'up press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'up confirm', 24, false);
|
||||
case 3:
|
||||
babyArrow.x += Note.swagWidth * 3;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowRIGHT');
|
||||
babyArrow.animation.addByPrefix('pressed', 'right press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'right confirm', 24, false);
|
||||
case 1:
|
||||
babyArrow.x += Note.swagWidth * 1;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowDOWN');
|
||||
babyArrow.animation.addByPrefix('pressed', 'down press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'down confirm', 24, false);
|
||||
case 0:
|
||||
babyArrow.x += Note.swagWidth * 0;
|
||||
babyArrow.animation.addByPrefix('static', 'arrowLEFT');
|
||||
babyArrow.animation.addByPrefix('pressed', 'left press', 24, false);
|
||||
babyArrow.animation.addByPrefix('confirm', 'left confirm', 24, false);
|
||||
}
|
||||
|
||||
babyArrow.animation.play('static');
|
||||
babyArrow.x += 50;
|
||||
babyArrow.x += ((FlxG.width / 2) * player);
|
||||
@ -1069,7 +1176,6 @@ class PlayState extends MusicBeatState
|
||||
gfSpeed = 1;
|
||||
case 163:
|
||||
// FlxG.sound.music.stop();
|
||||
// curLevel = 'Bopeebo';
|
||||
// FlxG.switchState(new TitleState());
|
||||
}
|
||||
}
|
||||
@ -1081,7 +1187,6 @@ class PlayState extends MusicBeatState
|
||||
case 128, 129, 130:
|
||||
vocals.volume = 0;
|
||||
// FlxG.sound.music.stop();
|
||||
// curLevel = 'Fresh';
|
||||
// FlxG.switchState(new PlayState());
|
||||
}
|
||||
}
|
||||
@ -1591,7 +1696,7 @@ class PlayState extends MusicBeatState
|
||||
spr.animation.play('static');
|
||||
}
|
||||
|
||||
if (spr.animation.curAnim.name == 'confirm')
|
||||
if (spr.animation.curAnim.name == 'confirm' && curStage != 'school')
|
||||
{
|
||||
spr.centerOffsets();
|
||||
spr.offset.x -= 13;
|
||||
|
Reference in New Issue
Block a user