Skip to content

Commit 6c785fa

Browse files
Make note creation functions return their note obj
1 parent d19f173 commit 6c785fa

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

scripts/noteSystem/NoteManager.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,19 @@ public override void _Process(double delta)
8989
}
9090
}
9191

92-
public void CreateNote(ArrowType arrow)
92+
public Note CreateNote(ArrowType arrow)
9393
{
94-
CreateNote(_arrows[arrow]);
94+
return CreateNote(_arrows[arrow]);
9595
}
9696

97-
private void CreateNote(ArrowData arrowData)
97+
private Note CreateNote(ArrowData arrowData)
9898
{
9999
var noteScene = ResourceLoader.Load<PackedScene>("res://scripts/noteSystem/note.tscn");
100100
var note = noteScene.Instantiate<Note>();
101101

102102
note.Init(arrowData, 1.0f, -1);
103103

104104
AddChild(note);
105+
return note;
105106
}
106107
}

0 commit comments

Comments
 (0)