Skip to content

Commit

Permalink
修改倍速信息显示方式
Browse files Browse the repository at this point in the history
  • Loading branch information
MisaLiu committed Oct 27, 2022
1 parent 0b94212 commit c6508f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/chart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default class Chart
return chart;
}

createSprites(stage, size, textures, zipFiles = {}, bgDim = 0.5, multiNoteHL = true, debug = false)
createSprites(stage, size, textures, zipFiles = {}, speed = 1, bgDim = 0.5, multiNoteHL = true, debug = false)
{
if (this.bg)
{
Expand Down Expand Up @@ -144,7 +144,7 @@ export default class Chart

this.sprites.info = {};

this.sprites.info.songName = new Text(this.info.name, {
this.sprites.info.songName = new Text(this.info.name + ((Math.round(speed * 100) !== 100) ? ' (x' + speed.toFixed(2) + ')' : ''), {
fontFamily: 'A-OTF Shin Go Pr6N H',
fill: 0xFFFFFF
});
Expand Down
6 changes: 1 addition & 5 deletions src/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,6 @@ export default class Game

createSprites()
{
if (Math.round(this._settings.speed * 100) !== 100)
{
this.chart.info.name += ' (x' + this._settings.speed.toFixed(2) + ')';
}

if (this.chart.bg)
{ // 创建超宽屏舞台覆盖
this.render.mainContainerCover = new Sprite(this.chart.bg);
Expand All @@ -171,6 +166,7 @@ export default class Game
this.render.sizer,
this.assets.textures,
this.zipFiles,
this._settings.speed,
this._settings.bgDim,
this._settings.multiNoteHL,
this._settings.debug
Expand Down

0 comments on commit c6508f0

Please sign in to comment.