Skip to content

Commit

Permalink
🎨 εŒζ™‚ζŠΌγ—γ‚¬γ‚€γƒ‰γ‚’η”»εƒγ«ε€‰ζ›΄ (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
3w36zj6 authored Nov 21, 2023
1 parent 88fbdeb commit be0361c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Binary file added dist/assets/skin/each_line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/class/ChartPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,14 @@ export class ChartPlayer {

// each line
for (const [beat, [leftPosition, rightPosition]] of Object.entries(eachLinePositions)) {
if (rightPosition === leftPosition) {
continue
}
const eachLine: EachLine = new EachLine(
parseFloat(beat),
scene.add
.rectangle(leftPosition, -100, rightPosition - leftPosition, 4, 0xffffff)
.image(leftPosition, -100, "each-line")
.setDisplaySize(rightPosition - leftPosition, 10)
.setOrigin(0, 0.5)
.setDepth(-2)
.setVisible(playConfig.noteType !== "rectangle"),
Expand Down
4 changes: 2 additions & 2 deletions src/class/EachLine.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export class EachLine {
public beat: number
public rectangle: Phaser.GameObjects.Rectangle
public rectangle: Phaser.GameObjects.Image

constructor(beat: number, rectangle: Phaser.GameObjects.Rectangle) {
constructor(beat: number, rectangle: Phaser.GameObjects.Image) {
this.beat = beat
this.rectangle = rectangle
}
Expand Down
2 changes: 2 additions & 0 deletions src/scene/LoadingScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export class LoadingScene extends Phaser.Scene {

this.load.image("longnote-line", "./assets/skin/longnote_line.png")

this.load.image("each-line", "./assets/skin/each_line.png")

this.load.image("judge-0", "./assets/skin/judge_0.png")
this.load.image("judge-1", "./assets/skin/judge_1.png")
this.load.image("judge-2", "./assets/skin/judge_2.png")
Expand Down

0 comments on commit be0361c

Please sign in to comment.