combo group

This commit is contained in:
Yoshman29
2022-11-01 18:29:01 +01:00
parent 2baa52a801
commit 8c11d7b219
2 changed files with 4 additions and 13 deletions
+1 -1
View File
@@ -1 +1 @@
943 946
+3 -12
View File
@@ -215,8 +215,7 @@ class PlayState extends MusicBeatState
var camPos:FlxPoint = new FlxPoint(dad.getGraphicMidpoint().x, dad.getGraphicMidpoint().y); var camPos:FlxPoint = new FlxPoint(dad.getGraphicMidpoint().x, dad.getGraphicMidpoint().y);
comboGroup = new FlxTypedGroup<FlxSprite>(); comboGroup = new FlxSpriteGroup(FlxG.width * 0.55, (FlxG.height * 0.5) - 60);
comboOffset = FlxPoint.get(FlxG.width * 0.55, -60);
boyfriend = new Character(770, 100, SONG.player1, true); boyfriend = new Character(770, 100, SONG.player1, true);
@@ -1074,8 +1073,7 @@ class PlayState extends MusicBeatState
public var endingSong:Bool = false; public var endingSong:Bool = false;
public var comboGroup:FlxTypedGroup<FlxSprite>; public var comboGroup:FlxSpriteGroup;
public var comboOffset:FlxPoint;
private function popUpScore(strumtime:Float, score:Int = 350):Void private function popUpScore(strumtime:Float, score:Int = 350):Void
{ {
@@ -1134,13 +1132,8 @@ class PlayState extends MusicBeatState
comboSpr.velocity.y -= 150; comboSpr.velocity.y -= 150;
comboSpr.velocity.x += FlxG.random.int(1, 10); comboSpr.velocity.x += FlxG.random.int(1, 10);
rating.x += comboOffset.x;
rating.y += comboOffset.y;
comboGroup.add(rating);
comboSpr.x += comboOffset.x;
comboSpr.y += comboOffset.y;
comboGroup.add(comboSpr); comboGroup.add(comboSpr);
comboGroup.add(rating);
if (!curStage.startsWith('school')) if (!curStage.startsWith('school'))
{ {
@@ -1185,8 +1178,6 @@ class PlayState extends MusicBeatState
numScore.velocity.y -= FlxG.random.int(140, 160); numScore.velocity.y -= FlxG.random.int(140, 160);
numScore.velocity.x = FlxG.random.float(-5, 5); numScore.velocity.x = FlxG.random.float(-5, 5);
numScore.x += comboOffset.x;
numScore.y += comboOffset.y;
comboGroup.add(numScore); comboGroup.add(numScore);
FlxTween.tween(numScore, {alpha: 0}, 0.2, { FlxTween.tween(numScore, {alpha: 0}, 0.2, {