This commit is contained in:
Yoshman29
2022-10-07 13:49:22 +02:00
parent 0d94f5bc05
commit 1e156c83ee
16 changed files with 99 additions and 21 deletions
+13 -13
View File
@@ -849,19 +849,19 @@ class PlayState extends MusicBeatState
{
camFollow.setPosition(boyfriend.getMidpoint().x - 100, boyfriend.getMidpoint().y - 100);
switch (curStage)
{
case 'limo':
camFollow.x = boyfriend.getMidpoint().x - 300;
case 'mall':
camFollow.y = boyfriend.getMidpoint().y - 200;
case 'school':
camFollow.x = boyfriend.getMidpoint().x - 200;
camFollow.y = boyfriend.getMidpoint().y - 200;
case 'schoolEvil':
camFollow.x = boyfriend.getMidpoint().x - 200;
camFollow.y = boyfriend.getMidpoint().y - 200;
}
// switch (curStage)
// {
// case 'limo':
// camFollow.x = boyfriend.getMidpoint().x - 300;
// case 'mall':
// camFollow.y = boyfriend.getMidpoint().y - 200;
// case 'school':
// camFollow.x = boyfriend.getMidpoint().x - 200;
// camFollow.y = boyfriend.getMidpoint().y - 200;
// case 'schoolEvil':
// camFollow.x = boyfriend.getMidpoint().x - 200;
// camFollow.y = boyfriend.getMidpoint().y - 200;
// }
camFollow.x += boyfriend.globalOffset.x;
camFollow.y += boyfriend.globalOffset.y;
+11
View File
@@ -9,7 +9,12 @@ import funkin.interfaces.IBeatReceiver;
class Stage extends FlxBasic implements IBeatReceiver {
public var stageXML:Access;
public var stageSprites:Map<String, FlxSprite> = [];
public var stageScript:Script;
public function getSprite(name:String) {
return stageSprites[name];
}
public function new(stage:String) {
super();
if (PlayState.instance == null) return;
@@ -51,6 +56,12 @@ class Stage extends FlxBasic implements IBeatReceiver {
var scroll:Null<Float> = Std.parseFloat(node.att.scroll);
if (scroll != null) spr.scrollFactor.set(scroll, scroll);
}
if (node.has.scale) {
var scale:Null<Float> = Std.parseFloat(node.att.scale);
if (scale != null) spr.scale.set(scale, scale);
}
if (node.has.updateHitbox && node.att.updateHitbox == "true") spr.updateHitbox();
for(anim in node.nodes.anim) CoolUtil.addXMLAnimation(spr, anim);
stageSprites.set(node.att.name, spr);