1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-24 14:16:56 +00:00

tank guy and quality of life shit

This commit is contained in:
Cameron Taylor 2021-03-07 15:34:21 -05:00
parent 7658fb245b
commit 4fae6773c9
5 changed files with 89 additions and 12 deletions

View file

@ -5,8 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
### Added
- TANKMAN! 3 NEW SONGS BY KAWAISPRITE (UGH, GUNS, STRESS)! Charting help by MtH!
- Monster added into week 2, FINALLY (Charting help by MtH and ChaoticGamer!)
- Can now change song difficulty mid-game.
- Shows some song info on pause screen.
- Cute little icons onto freeplay menu
### Changed ### Changed
- ASSET LOADING OVERHAUL, WAY FASTER LOAD TIMES ON WEB!!! (THANKS TO GEOKURELI WOKE KING) - ASSET LOADING OVERHAUL, WAY FASTER LOAD TIMES ON WEB!!! (THANKS TO GEOKURELI WOKE KING)
- Made difficulty selector on freeplay menu more apparent
### Fixed ### Fixed
- That one random note on Bopeebo - That one random note on Bopeebo

19
source/BGSprite.hx Normal file
View file

@ -0,0 +1,19 @@
package;
import flixel.FlxSprite;
class BGSprite extends FlxSprite
{
/**
Cool lil utility thing just so that it can easy do antialiasing and scrollfactor bullshit
*/
public function new(image:String, x:Float = 0, y:Float = 0, parX:Float = 1, parY:Float = 1)
{
super(x, y);
loadGraphic(Paths.image(image));
scrollFactor.set(parX, parY);
antialiasing = true;
active = false;
}
}

View file

@ -219,9 +219,6 @@ class FreeplayState extends MusicBeatState
if (accepted) if (accepted)
{ {
var poop:String = Highscore.formatSong(songs[curSelected].songName.toLowerCase(), curDifficulty); var poop:String = Highscore.formatSong(songs[curSelected].songName.toLowerCase(), curDifficulty);
trace(poop);
PlayState.SONG = Song.loadFromJson(poop, songs[curSelected].songName.toLowerCase()); PlayState.SONG = Song.loadFromJson(poop, songs[curSelected].songName.toLowerCase());
PlayState.isStoryMode = false; PlayState.isStoryMode = false;
PlayState.storyDifficulty = curDifficulty; PlayState.storyDifficulty = curDifficulty;

View file

@ -17,7 +17,10 @@ class PauseSubState extends MusicBeatSubstate
{ {
var grpMenuShit:FlxTypedGroup<Alphabet>; var grpMenuShit:FlxTypedGroup<Alphabet>;
var menuItems:Array<String> = ['Resume', 'Restart Song', 'Exit to menu']; var pauseOG:Array<String> = ['Resume', 'Restart Song', 'Change Difficulty', 'Exit to menu'];
var difficultyChoices:Array<String> = ['EASY', 'NORMAL', 'HARD', 'BACK'];
var menuItems:Array<String> = [];
var curSelected:Int = 0; var curSelected:Int = 0;
var pauseMusic:FlxSound; var pauseMusic:FlxSound;
@ -26,6 +29,8 @@ class PauseSubState extends MusicBeatSubstate
{ {
super(); super();
menuItems = pauseOG;
pauseMusic = new FlxSound().loadEmbedded(Paths.music('breakfast'), true, true); pauseMusic = new FlxSound().loadEmbedded(Paths.music('breakfast'), true, true);
pauseMusic.volume = 0; pauseMusic.volume = 0;
pauseMusic.play(false, FlxG.random.int(0, Std.int(pauseMusic.length / 2))); pauseMusic.play(false, FlxG.random.int(0, Std.int(pauseMusic.length / 2)));
@ -74,6 +79,19 @@ class PauseSubState extends MusicBeatSubstate
grpMenuShit = new FlxTypedGroup<Alphabet>(); grpMenuShit = new FlxTypedGroup<Alphabet>();
add(grpMenuShit); add(grpMenuShit);
regenMenu();
cameras = [FlxG.cameras.list[FlxG.cameras.list.length - 1]];
}
private function regenMenu():Void
{
grpMenuShit.forEachAlive(function(thing:Alphabet)
{
grpMenuShit.remove(thing);
thing.destroy();
});
for (i in 0...menuItems.length) for (i in 0...menuItems.length)
{ {
var songText:Alphabet = new Alphabet(0, (70 * i) + 30, menuItems[i], true, false); var songText:Alphabet = new Alphabet(0, (70 * i) + 30, menuItems[i], true, false);
@ -82,9 +100,8 @@ class PauseSubState extends MusicBeatSubstate
grpMenuShit.add(songText); grpMenuShit.add(songText);
} }
curSelected = 0;
changeSelection(); changeSelection();
cameras = [FlxG.cameras.list[FlxG.cameras.list.length - 1]];
} }
override function update(elapsed:Float) override function update(elapsed:Float)
@ -115,10 +132,24 @@ class PauseSubState extends MusicBeatSubstate
{ {
case "Resume": case "Resume":
close(); close();
case "EASY" | 'NORMAL' | "HARD":
PlayState.SONG = Song.loadFromJson(Highscore.formatSong(PlayState.SONG.song.toLowerCase(), curSelected),
PlayState.SONG.song.toLowerCase());
PlayState.storyDifficulty = curSelected;
FlxG.resetState();
case 'Change Difficulty':
menuItems = difficultyChoices;
regenMenu();
case 'BACK':
menuItems = pauseOG;
regenMenu();
case "Restart Song": case "Restart Song":
FlxG.resetState(); FlxG.resetState();
case "Exit to menu": case "Exit to menu":
PlayState.deathCounter += 1; PlayState.deathCounter = 0;
FlxG.switchState(new MainMenuState()); FlxG.switchState(new MainMenuState());
} }
} }

View file

@ -174,7 +174,7 @@ class PlayState extends MusicBeatState
dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue')); dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue'));
} }
switch (Song.song.toLowerCase()) switch (SONG.song.toLowerCase())
{ {
case 'spookeez' | 'monster' | 'south': case 'spookeez' | 'monster' | 'south':
curStage = "spooky"; curStage = "spooky";
@ -469,13 +469,36 @@ class PlayState extends MusicBeatState
add(waveSpriteFG); add(waveSpriteFG);
*/ */
case 'guns' | 'stress' | 'ugh':
// defaultCamZoom = 0.9;
curStage = 'tank';
var bg:BGSprite = new BGSprite('tankSky', 0, -200, 0, 0);
add(bg);
var tankSky:BGSprite = new BGSprite('tankClouds', 0, 10, 0.1, 0.1);
add(tankSky);
var tankMountains:BGSprite = new BGSprite('tankMountains', -100, 150, 0.2, 0.2);
add(tankMountains);
var tankBuildings:BGSprite = new BGSprite('tankBuildings', -200, 370, 0.25, 0.25);
add(tankBuildings);
var tankRuins:BGSprite = new BGSprite('tankRuins', -200, 170, 0.35, 0.35);
add(tankRuins);
var tankWatchtower:BGSprite = new BGSprite('tankWatchtower', 300, 50, 0.5, 0.5);
add(tankWatchtower);
var tankGround:BGSprite = new BGSprite('tankGround', -400, -20);
add(tankGround);
default: default:
defaultCamZoom = 0.9; defaultCamZoom = 0.9;
curStage = 'stage'; curStage = 'stage';
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('stageback'));
bg.antialiasing = true; var bg:BGSprite = new BGSprite('stageback', -600, -200, 0.9, 0.9);
bg.scrollFactor.set(0.9, 0.9);
bg.active = false;
add(bg); add(bg);
var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront')); var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront'));