mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-23 16:17:53 -05:00
the friday night funkin creepypasta
This commit is contained in:
parent
bab7c0130d
commit
6c47686ee8
2 changed files with 54 additions and 2 deletions
|
@ -15,6 +15,7 @@ class SprStage extends FlxSprite
|
||||||
|
|
||||||
FlxMouseEventManager.add(this, dragShit, null, function(spr:SprStage)
|
FlxMouseEventManager.add(this, dragShit, null, function(spr:SprStage)
|
||||||
{
|
{
|
||||||
|
if (FlxG.keys.pressed.CONTROL)
|
||||||
alpha = 0.5;
|
alpha = 0.5;
|
||||||
}, function(spr:SprStage)
|
}, function(spr:SprStage)
|
||||||
{
|
{
|
||||||
|
@ -44,7 +45,9 @@ class SprStage extends FlxSprite
|
||||||
|
|
||||||
function dragShit(spr:SprStage)
|
function dragShit(spr:SprStage)
|
||||||
{
|
{
|
||||||
|
if (FlxG.keys.pressed.CONTROL)
|
||||||
StageBuilderState.curSelectedSpr = this;
|
StageBuilderState.curSelectedSpr = this;
|
||||||
|
|
||||||
mousePressing = true;
|
mousePressing = true;
|
||||||
|
|
||||||
mouseOffset.set(FlxG.mouse.x - this.x, FlxG.mouse.y - this.y);
|
mouseOffset.set(FlxG.mouse.x - this.x, FlxG.mouse.y - this.y);
|
||||||
|
|
|
@ -147,6 +147,18 @@ class StageBuilderState extends MusicBeatState
|
||||||
// trace(sndChannel.position);
|
// trace(sndChannel.position);
|
||||||
// trace(snd
|
// trace(snd
|
||||||
|
|
||||||
|
if (FlxG.keys.justPressed.R)
|
||||||
|
{
|
||||||
|
shakingScreen();
|
||||||
|
|
||||||
|
FlxG.stage.window.title = "YOU WILL DIE";
|
||||||
|
|
||||||
|
// FlxG.stage.window.x -= Std.int(10);
|
||||||
|
// FlxG.stage.window.y -= Std.int(10);
|
||||||
|
// FlxG.stage.window.width += Std.int(40);
|
||||||
|
// FlxG.stage.window.height += Std.int(20);
|
||||||
|
}
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.UP)
|
if (FlxG.keys.justPressed.UP)
|
||||||
{
|
{
|
||||||
if (curSelectedSpr != null)
|
if (curSelectedSpr != null)
|
||||||
|
@ -162,14 +174,51 @@ class StageBuilderState extends MusicBeatState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FlxG.keys.justPressed.DELETE)
|
||||||
|
{
|
||||||
|
if (curSelectedSpr != null)
|
||||||
|
{
|
||||||
|
sprGrp.remove(curSelectedSpr, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CoolUtil.mouseCamDrag();
|
CoolUtil.mouseCamDrag();
|
||||||
|
|
||||||
if (FlxG.keys.pressed.CONTROL)
|
if (FlxG.keys.pressed.CONTROL)
|
||||||
CoolUtil.mouseWheelZoom();
|
CoolUtil.mouseWheelZoom();
|
||||||
|
|
||||||
|
if (isShaking)
|
||||||
|
{
|
||||||
|
FlxG.stage.window.x = Std.int(shakePos.x + (FlxG.random.float(-1, 1) * shakeIntensity));
|
||||||
|
FlxG.stage.window.y = Std.int(shakePos.y + (FlxG.random.float(-1, 1) * shakeIntensity));
|
||||||
|
|
||||||
|
shakeIntensity -= 30 * elapsed;
|
||||||
|
|
||||||
|
if (shakeIntensity <= 0)
|
||||||
|
{
|
||||||
|
isShaking = false;
|
||||||
|
shakeIntensity = 60;
|
||||||
|
FlxG.stage.window.x = Std.int(shakePos.x);
|
||||||
|
FlxG.stage.window.y = Std.int(shakePos.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var isShaking:Bool = false;
|
||||||
|
var shakeIntensity:Float = 60;
|
||||||
|
var shakePos:FlxPoint = new FlxPoint();
|
||||||
|
|
||||||
|
function shakingScreen()
|
||||||
|
{
|
||||||
|
if (!isShaking)
|
||||||
|
{
|
||||||
|
isShaking = true;
|
||||||
|
shakePos.set(FlxG.stage.window.x, FlxG.stage.window.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function sortSprGrp()
|
function sortSprGrp()
|
||||||
{
|
{
|
||||||
sprGrp.sort(daLayerSorting, FlxSort.ASCENDING);
|
sprGrp.sort(daLayerSorting, FlxSort.ASCENDING);
|
||||||
|
|
Loading…
Reference in a new issue