06. Note Segments
In this chapter, we will implement note segments.
Segments
Project templates come with empty example segments, we can rename them to note segments.
Each segment exports an object that may optionally have enter
, update
, exit
methods which will be called at appropriate times.
Intro segment simply shows and clears the overlay.
export const noteIntro = {
enter() {
noteDisplay.showOverlay()
},
exit() {
noteDisplay.clear()
},
}
export const noteIntro = {
enter() {
noteDisplay.showOverlay()
},
exit() {
noteDisplay.clear()
},
}
And similarly for fall and frozen segments:
export const noteFall = {
enter() {
noteDisplay.showFall()
},
exit() {
noteDisplay.clear()
},
}
export const noteFall = {
enter() {
noteDisplay.showFall()
},
exit() {
noteDisplay.clear()
},
}
export const noteFrozen = {
enter() {
noteDisplay.showFrozen()
},
exit() {
noteDisplay.clear()
},
}
export const noteFrozen = {
enter() {
noteDisplay.showFrozen()
},
exit() {
noteDisplay.clear()
},
}
For now, hit segment is empty:
export const noteHit = {}
export const noteHit = {}