some fixes
This commit is contained in:
@@ -763,6 +763,7 @@ class Charter extends UIState {
|
||||
var strID = getStrumlineID(strL);
|
||||
FlxG.state.openSubState(new CharterStrumlineScreen(strID, strL, (_) -> {
|
||||
strumLines.members[strID].strumLine = _;
|
||||
strumLines.members[strID].updateInfo();
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -39,13 +39,23 @@ class CharterStrumline extends UISprite {
|
||||
}
|
||||
|
||||
public override function update(elapsed:Float) {
|
||||
healthIcon.follow(this, ((40 * 4) - healthIcon.width) / 2, 0);
|
||||
if (healthIcon != null)
|
||||
healthIcon.follow(this, ((40 * 4) - healthIcon.width) / 2, 0);
|
||||
button.follow(this, 0, 95);
|
||||
super.update(elapsed);
|
||||
}
|
||||
|
||||
public function updateInfo() {
|
||||
// todo
|
||||
members.remove(healthIcon);
|
||||
healthIcon.destroy();
|
||||
|
||||
var icon = Character.getIconFromCharName(strumLine.characters != null ? strumLine.characters[0] : null);
|
||||
|
||||
healthIcon = new HealthIcon(icon);
|
||||
healthIcon.scale.set(80 / 150, 80 / 150);
|
||||
healthIcon.updateHitbox();
|
||||
healthIcon.alpha = strumLine.visible ? 1 : 0.4;
|
||||
members.push(healthIcon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@ class CharterStrumlineScreen extends UISubstateWindow {
|
||||
(charactersTextBox.y + 16) - (iconSprite.height/2)
|
||||
);
|
||||
add(iconSprite);
|
||||
characterIcons.push(iconSprite);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user