mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-09-17 15:38:52 +00:00
Merge remote-tracking branch 'origin/feature/week-4-gameplay'
This commit is contained in:
commit
9db6f7f32a
|
@ -31,6 +31,7 @@ class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
{
|
{
|
||||||
kill();
|
kill();
|
||||||
};
|
};
|
||||||
|
effectStuff.setGraphicSize(Std.int(effectStuff.width * 0.7));
|
||||||
add(effectStuff);
|
add(effectStuff);
|
||||||
|
|
||||||
grpNumbers = new FlxTypedGroup<ComboNumber>();
|
grpNumbers = new FlxTypedGroup<ComboNumber>();
|
||||||
|
@ -90,7 +91,8 @@ class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
|
|
||||||
while (daCombo > 0)
|
while (daCombo > 0)
|
||||||
{
|
{
|
||||||
var comboNumber:ComboNumber = new ComboNumber(420 - (130 * loopNum), 44 * loopNum, daCombo % 10);
|
var comboNumber:ComboNumber = new ComboNumber(450 - (100 * loopNum), 20 + 14 * loopNum, daCombo % 10);
|
||||||
|
comboNumber.setGraphicSize(Std.int(comboNumber.width * 0.7));
|
||||||
grpNumbers.add(comboNumber);
|
grpNumbers.add(comboNumber);
|
||||||
add(comboNumber);
|
add(comboNumber);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class StoryMenuState extends MusicBeatState
|
||||||
['Cocoa', 'Eggnog', 'Winter-Horrorland'],
|
['Cocoa', 'Eggnog', 'Winter-Horrorland'],
|
||||||
['Senpai', 'Roses', 'Thorns'],
|
['Senpai', 'Roses', 'Thorns'],
|
||||||
['Ugh', 'Guns', 'Stress'],
|
['Ugh', 'Guns', 'Stress'],
|
||||||
['Darnell', "lit-up", "2hot"]
|
['Darnell', "lit-up", "2hot", "blazin"]
|
||||||
];
|
];
|
||||||
var curDifficulty:Int = 1;
|
var curDifficulty:Int = 1;
|
||||||
|
|
||||||
|
|
|
@ -416,6 +416,7 @@ class PlayState extends MusicBeatState
|
||||||
add(cameraFollowPoint);
|
add(cameraFollowPoint);
|
||||||
|
|
||||||
comboPopUps = new PopUpStuff();
|
comboPopUps = new PopUpStuff();
|
||||||
|
comboPopUps.cameras = [camHUD];
|
||||||
add(comboPopUps);
|
add(comboPopUps);
|
||||||
|
|
||||||
grpNoteSplashes = new FlxTypedGroup<NoteSplash>();
|
grpNoteSplashes = new FlxTypedGroup<NoteSplash>();
|
||||||
|
@ -1813,10 +1814,22 @@ class PlayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
FlxG.sound.music.pause();
|
FlxG.sound.music.pause();
|
||||||
|
|
||||||
// BPM might change between the current and target section but IDGAF
|
var daBPM:Float = currentSong.bpm;
|
||||||
FlxG.sound.music.time = Conductor.songPosition + (sec * 4 * (1000 * 60 / Conductor.bpm));
|
var daPos:Float = 0;
|
||||||
|
for (i in 0...(Std.int(curStep / 16 + sec)))
|
||||||
Conductor.update();
|
{
|
||||||
|
var section = SongLoad.getSong()[i];
|
||||||
|
if (section == null)
|
||||||
|
continue;
|
||||||
|
if (section.changeBPM)
|
||||||
|
{
|
||||||
|
daBPM = SongLoad.getSong()[i].bpm;
|
||||||
|
}
|
||||||
|
daPos += 4 * (1000 * 60 / daBPM);
|
||||||
|
}
|
||||||
|
Conductor.songPosition = FlxG.sound.music.time = daPos;
|
||||||
|
Conductor.songPosition += Conductor.offset;
|
||||||
|
updateCurStep();
|
||||||
resyncVocals();
|
resyncVocals();
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
@ -2385,6 +2398,7 @@ class PlayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
var animShit:ComboCounter = new ComboCounter(-100, 300, Highscore.tallies.combo);
|
var animShit:ComboCounter = new ComboCounter(-100, 300, Highscore.tallies.combo);
|
||||||
animShit.scrollFactor.set(0.6, 0.6);
|
animShit.scrollFactor.set(0.6, 0.6);
|
||||||
|
animShit.cameras = [camHUD];
|
||||||
add(animShit);
|
add(animShit);
|
||||||
|
|
||||||
var frameShit:Float = (1 / 24) * 2; // equals 2 frames in the animation
|
var frameShit:Float = (1 / 24) * 2; // equals 2 frames in the animation
|
||||||
|
|
|
@ -469,19 +469,13 @@ class BaseCharacter extends Bopper
|
||||||
{
|
{
|
||||||
// If the note is from the same strumline, play the sing animation.
|
// If the note is from the same strumline, play the sing animation.
|
||||||
this.playSingAnimation(event.note.data.dir, false);
|
this.playSingAnimation(event.note.data.dir, false);
|
||||||
|
holdTimer = 0;
|
||||||
}
|
}
|
||||||
else if (!event.note.mustPress && characterType == DAD)
|
else if (!event.note.mustPress && characterType == DAD)
|
||||||
{
|
{
|
||||||
// If the note is from the same strumline, play the sing animation.
|
// If the note is from the same strumline, play the sing animation.
|
||||||
this.playSingAnimation(event.note.data.dir, false);
|
this.playSingAnimation(event.note.data.dir, false);
|
||||||
}
|
holdTimer = 0;
|
||||||
else if (characterType == GF)
|
|
||||||
{
|
|
||||||
if (event.note.mustPress && this.comboNoteCounts.contains(event.comboCount))
|
|
||||||
{
|
|
||||||
trace('Playing GF combo animation: combo${event.comboCount}');
|
|
||||||
this.playAnimation('combo${event.comboCount}', true, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package funkin.ui;
|
package funkin.ui;
|
||||||
|
|
||||||
import funkin.util.Constants;
|
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||||
import flixel.tweens.FlxTween;
|
import flixel.tweens.FlxTween;
|
||||||
import funkin.play.PlayState;
|
import funkin.play.PlayState;
|
||||||
|
import funkin.util.Constants;
|
||||||
|
|
||||||
using StringTools;
|
using StringTools;
|
||||||
|
|
||||||
|
@ -20,21 +20,26 @@ class PopUpStuff extends FlxTypedGroup<FlxSprite>
|
||||||
if (daRating == null)
|
if (daRating == null)
|
||||||
daRating = "good";
|
daRating = "good";
|
||||||
|
|
||||||
var rating:FlxSprite = new FlxSprite();
|
var rating:FlxSprite = new FlxSprite(0, 0);
|
||||||
|
rating.scrollFactor.set(0.2, 0.2);
|
||||||
|
|
||||||
|
rating.zIndex = 1000;
|
||||||
var ratingPath:String = daRating;
|
var ratingPath:String = daRating;
|
||||||
|
|
||||||
if (PlayState.instance.currentStageId.startsWith('school'))
|
if (PlayState.instance.currentStageId.startsWith('school'))
|
||||||
ratingPath = "weeb/pixelUI/" + ratingPath + "-pixel";
|
ratingPath = "weeb/pixelUI/" + ratingPath + "-pixel";
|
||||||
|
|
||||||
rating.loadGraphic(Paths.image(ratingPath));
|
rating.loadGraphic(Paths.image(ratingPath));
|
||||||
rating.x = FlxG.width * 0.55 - 40;
|
rating.x = FlxG.width * 0.50;
|
||||||
|
rating.x -= FlxG.camera.scroll.x * 0.2;
|
||||||
// make sure rating is visible lol!
|
// make sure rating is visible lol!
|
||||||
if (rating.x < FlxG.camera.scroll.x)
|
// if (rating.x < FlxG.camera.scroll.x)
|
||||||
rating.x = FlxG.camera.scroll.x;
|
// rating.x = FlxG.camera.scroll.x;
|
||||||
else if (rating.x > FlxG.camera.scroll.x + FlxG.camera.width - rating.width)
|
// else if (rating.x > FlxG.camera.scroll.x + FlxG.camera.width - rating.width)
|
||||||
rating.x = FlxG.camera.scroll.x + FlxG.camera.width - rating.width;
|
// rating.x = FlxG.camera.scroll.x + FlxG.camera.width - rating.width;
|
||||||
|
|
||||||
rating.y = FlxG.camera.scroll.y + FlxG.camera.height * 0.4 - 60;
|
// FlxG.camera.scroll.y +
|
||||||
|
rating.y = FlxG.camera.height * 0.4 - 60;
|
||||||
rating.acceleration.y = 550;
|
rating.acceleration.y = 550;
|
||||||
rating.velocity.y -= FlxG.random.int(140, 175);
|
rating.velocity.y -= FlxG.random.int(140, 175);
|
||||||
rating.velocity.x -= FlxG.random.int(0, 10);
|
rating.velocity.x -= FlxG.random.int(0, 10);
|
||||||
|
@ -76,14 +81,15 @@ class PopUpStuff extends FlxTypedGroup<FlxSprite>
|
||||||
pixelShitPart2 = '-pixel';
|
pixelShitPart2 = '-pixel';
|
||||||
}
|
}
|
||||||
var comboSpr:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'combo' + pixelShitPart2));
|
var comboSpr:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'combo' + pixelShitPart2));
|
||||||
comboSpr.y = FlxG.camera.scroll.y + FlxG.camera.height * 0.4 + 80;
|
comboSpr.y = FlxG.camera.height * 0.4 + 80;
|
||||||
comboSpr.x = FlxG.width * 0.55;
|
comboSpr.x = FlxG.width * 0.50;
|
||||||
|
comboSpr.x -= FlxG.camera.scroll.x * 0.2;
|
||||||
// make sure combo is visible lol!
|
// make sure combo is visible lol!
|
||||||
// 194 fits 4 combo digits
|
// 194 fits 4 combo digits
|
||||||
if (comboSpr.x < FlxG.camera.scroll.x + 194)
|
// if (comboSpr.x < FlxG.camera.scroll.x + 194)
|
||||||
comboSpr.x = FlxG.camera.scroll.x + 194;
|
// comboSpr.x = FlxG.camera.scroll.x + 194;
|
||||||
else if (comboSpr.x > FlxG.camera.scroll.x + FlxG.camera.width - comboSpr.width)
|
// else if (comboSpr.x > FlxG.camera.scroll.x + FlxG.camera.width - comboSpr.width)
|
||||||
comboSpr.x = FlxG.camera.scroll.x + FlxG.camera.width - comboSpr.width;
|
// comboSpr.x = FlxG.camera.scroll.x + FlxG.camera.width - comboSpr.width;
|
||||||
|
|
||||||
comboSpr.acceleration.y = 600;
|
comboSpr.acceleration.y = 600;
|
||||||
comboSpr.velocity.y -= 150;
|
comboSpr.velocity.y -= 150;
|
||||||
|
|
|
@ -2,16 +2,22 @@ package funkin.ui.stageBuildShit;
|
||||||
|
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
import flixel.input.mouse.FlxMouseEvent;
|
import flixel.input.mouse.FlxMouseEvent;
|
||||||
|
<<<<<<< HEAD
|
||||||
import flixel.input.mouse.FlxMouseEventManager;
|
import flixel.input.mouse.FlxMouseEventManager;
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/feature/week-4-gameplay
|
||||||
import flixel.math.FlxPoint;
|
import flixel.math.FlxPoint;
|
||||||
import flixel.ui.FlxButton;
|
|
||||||
import funkin.play.PlayState;
|
import funkin.play.PlayState;
|
||||||
|
<<<<<<< HEAD
|
||||||
import funkin.play.stage.StageData.StageDataParser;
|
import funkin.play.stage.StageData.StageDataParser;
|
||||||
import funkin.play.stage.StageData;
|
import funkin.play.stage.StageData;
|
||||||
import haxe.ui.RuntimeComponentBuilder;
|
import haxe.ui.RuntimeComponentBuilder;
|
||||||
import haxe.ui.containers.VBox;
|
import haxe.ui.containers.VBox;
|
||||||
|
=======
|
||||||
|
import funkin.play.stage.StageData;
|
||||||
|
import haxe.ui.RuntimeComponentBuilder;
|
||||||
|
>>>>>>> origin/feature/week-4-gameplay
|
||||||
import haxe.ui.core.Component;
|
import haxe.ui.core.Component;
|
||||||
import openfl.Assets;
|
|
||||||
import openfl.events.Event;
|
import openfl.events.Event;
|
||||||
import openfl.events.IOErrorEvent;
|
import openfl.events.IOErrorEvent;
|
||||||
import openfl.net.FileReference;
|
import openfl.net.FileReference;
|
||||||
|
@ -81,11 +87,18 @@ class StageOffsetSubstate extends MusicBeatSubstate
|
||||||
char.y = sprOld.y - (mosPosOld.y - FlxG.mouse.y);
|
char.y = sprOld.y - (mosPosOld.y - FlxG.mouse.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FlxG.mouse.visible = true;
|
||||||
|
|
||||||
CoolUtil.mouseCamDrag();
|
CoolUtil.mouseCamDrag();
|
||||||
|
|
||||||
if (FlxG.keys.pressed.CONTROL)
|
if (FlxG.keys.pressed.CONTROL)
|
||||||
CoolUtil.mouseWheelZoom();
|
CoolUtil.mouseWheelZoom();
|
||||||
|
|
||||||
|
if (FlxG.mouse.wheel != 0)
|
||||||
|
{
|
||||||
|
FlxG.camera.zoom += FlxG.mouse.wheel * 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.Y)
|
if (FlxG.keys.justPressed.Y)
|
||||||
{
|
{
|
||||||
for (thing in PlayState.instance.currentStage)
|
for (thing in PlayState.instance.currentStage)
|
||||||
|
|
Loading…
Reference in a new issue