Add note array and view.
This commit is contained in:
21
rhythm_game/note/lane_view.gd
Normal file
21
rhythm_game/note/lane_view.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
## A NoteView that stores notes that exist on a lane.
|
||||
class_name LaneView extends NoteView
|
||||
|
||||
## The lane notes will be filtered by.
|
||||
@export var lane: int
|
||||
|
||||
## Get the array this LaneView refers to.
|
||||
func get_data() -> NoteSubset:
|
||||
return _lane_notes
|
||||
|
||||
func update_current_beat(beat: float) -> void:
|
||||
_current_beat = beat
|
||||
_update_view_relative_to_notes(_lane_notes)
|
||||
|
||||
# ======== Implementation ======== #
|
||||
var _lane_notes: NoteSubset
|
||||
|
||||
func _set_data(p_notes: NoteArray) -> void:
|
||||
notes = p_notes
|
||||
_lane_notes = NoteSubset.get_notes_in_lane(p_notes, lane)
|
||||
_reset_view()
|
||||
Reference in New Issue
Block a user