mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-06-07 16:22:13 +00:00
cheat code bullshit oops im on swf branch LOL!
This commit is contained in:
parent
356a9ad337
commit
6f0b0fc6bb
|
@ -131,6 +131,7 @@
|
|||
<!-- swf stufffff -->
|
||||
<haxelib name="swf"/>
|
||||
<library path="assets/tanky.swf" preload="true"/>
|
||||
<library path="assets/tankBG.swf" preload="true"/>
|
||||
|
||||
<!-- <haxelib name="flixel-animate" /> -->
|
||||
<!-- <haxelib name="spinehaxe" /> -->
|
||||
|
|
|
@ -11,6 +11,7 @@ import flixel.util.FlxColor;
|
|||
import openfl.Assets;
|
||||
import openfl.display.BitmapData;
|
||||
import openfl.display.MovieClip;
|
||||
import openfl.display.Timeline;
|
||||
import openfl.geom.Matrix;
|
||||
import openfl.geom.Rectangle;
|
||||
|
||||
|
@ -37,14 +38,27 @@ class CutsceneAnimTestState extends FlxState
|
|||
add(debugTxt);
|
||||
|
||||
clip = Assets.getMovieClip("tanky:");
|
||||
//clip.x = FlxG.width/2;
|
||||
//clip.y = FlxG.height/2;
|
||||
// clip.x = FlxG.width/2;
|
||||
// clip.y = FlxG.height/2;
|
||||
FlxG.stage.addChild(clip);
|
||||
|
||||
funnySprite.x = FlxG.width/2;
|
||||
funnySprite.y = FlxG.height/2;
|
||||
add(funnySprite);
|
||||
var swagShit:MovieClip = Assets.getMovieClip('tankBG:');
|
||||
// swagShit.scaleX = 5;
|
||||
|
||||
FlxG.stage.addChild(swagShit);
|
||||
swagShit.gotoAndStop(13);
|
||||
|
||||
var swfMountain = new BitmapData(FlxG.width, FlxG.height, true, 0x00000000);
|
||||
swfMountain.draw(swagShit, swagShit.transform.matrix);
|
||||
|
||||
var mountains:FlxSprite = new FlxSprite().loadGraphic(swfMountain);
|
||||
// add(mountains);
|
||||
|
||||
FlxG.stage.removeChild(swagShit);
|
||||
|
||||
funnySprite.x = FlxG.width / 2;
|
||||
funnySprite.y = FlxG.height / 2;
|
||||
add(funnySprite);
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
|
|
|
@ -2,6 +2,7 @@ package;
|
|||
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxGame;
|
||||
import flixel.FlxObject;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond;
|
||||
import flixel.addons.transition.FlxTransitionableState;
|
||||
|
@ -487,9 +488,55 @@ class TitleState extends MusicBeatState
|
|||
// alphaShader.update(elapsed * 0.1);
|
||||
}
|
||||
|
||||
if (!cheatActive && skippedIntro)
|
||||
cheatCodeShit();
|
||||
|
||||
super.update(elapsed);
|
||||
}
|
||||
|
||||
var cheatArray:Array<Int> = [0x0001, 0x0010, 0x0001, 0x0010, 0x0100, 0x1000, 0x0100, 0x1000];
|
||||
var curCheatPos:Int = 0;
|
||||
var cheatActive:Bool = false;
|
||||
|
||||
function cheatCodeShit():Void
|
||||
{
|
||||
if (FlxG.keys.justPressed.ANY)
|
||||
{
|
||||
if (controls.NOTE_DOWN_P || controls.UI_DOWN_P)
|
||||
codePress(FlxObject.DOWN);
|
||||
if (controls.NOTE_UP_P || controls.UI_UP_P)
|
||||
codePress(FlxObject.UP);
|
||||
if (controls.NOTE_LEFT_P || controls.UI_LEFT_P)
|
||||
codePress(FlxObject.LEFT);
|
||||
if (controls.NOTE_RIGHT_P || controls.UI_RIGHT_P)
|
||||
codePress(FlxObject.RIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
function codePress(input:Int)
|
||||
{
|
||||
if (input == cheatArray[curCheatPos])
|
||||
{
|
||||
curCheatPos += 1;
|
||||
if (curCheatPos >= cheatArray.length)
|
||||
startCheat();
|
||||
}
|
||||
else
|
||||
curCheatPos = 0;
|
||||
|
||||
trace(input);
|
||||
}
|
||||
|
||||
function startCheat():Void
|
||||
{
|
||||
cheatActive = true;
|
||||
|
||||
FlxG.sound.playMusic(Paths.music('tutorialTitle'), 1);
|
||||
Conductor.changeBPM(190);
|
||||
FlxG.camera.flash(FlxColor.WHITE, 1);
|
||||
FlxG.sound.play(Paths.sound('confirmMenu'), 0.7);
|
||||
}
|
||||
|
||||
function createCoolText(textArray:Array<String>)
|
||||
{
|
||||
for (i in 0...textArray.length)
|
||||
|
@ -526,6 +573,9 @@ class TitleState extends MusicBeatState
|
|||
{
|
||||
super.beatHit();
|
||||
|
||||
if (cheatActive && curBeat % 2 == 0)
|
||||
swagShader.update(0.125);
|
||||
|
||||
logoBl.animation.play('bump', true);
|
||||
|
||||
danceLeft = !danceLeft;
|
||||
|
|
20
source/ui/StageBuilderState.hx
Normal file
20
source/ui/StageBuilderState.hx
Normal file
|
@ -0,0 +1,20 @@
|
|||
package ui;
|
||||
|
||||
import flixel.FlxSprite;
|
||||
import flixel.addons.display.FlxGridOverlay;
|
||||
|
||||
class StageBuilderState extends MusicBeatState
|
||||
{
|
||||
public function new()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
override function create()
|
||||
{
|
||||
super.create();
|
||||
|
||||
var bg:FlxSprite = FlxGridOverlay.create(10, 10);
|
||||
add(bg);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue