mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-08-18 22:14:37 +00:00
hide storymode menu characters if they dont exist for the level
This commit is contained in:
parent
cf01f8c0f3
commit
b96232787a
|
@ -187,6 +187,10 @@ class Level implements IRegistryEntry<LevelData>
|
||||||
|
|
||||||
if (_data.props.length == 0) return props;
|
if (_data.props.length == 0) return props;
|
||||||
|
|
||||||
|
var hiddenProps:Array<LevelProp> = props.splice(_data.props.length - 1, props.length - 1);
|
||||||
|
for (hiddenProp in hiddenProps)
|
||||||
|
hiddenProp.visible = false;
|
||||||
|
|
||||||
for (propIndex in 0..._data.props.length)
|
for (propIndex in 0..._data.props.length)
|
||||||
{
|
{
|
||||||
var propData = _data.props[propIndex];
|
var propData = _data.props[propIndex];
|
||||||
|
@ -198,6 +202,7 @@ class Level implements IRegistryEntry<LevelData>
|
||||||
{
|
{
|
||||||
existingProp.propData = propData;
|
existingProp.propData = propData;
|
||||||
existingProp.x = propData.offsets[0] + FlxG.width * 0.25 * propIndex;
|
existingProp.x = propData.offsets[0] + FlxG.width * 0.25 * propIndex;
|
||||||
|
existingProp.visible = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue