Skip to content

Commit e893e0b

Browse files
authored
add addScenes function (#179)
add addScenes function
1 parent c31edd8 commit e893e0b

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src/main/java/tech/fastj/systems/control/SceneManager.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,29 @@ public void addScene(Scene scene) {
162162
scenes.put(scene.getSceneName(), scene);
163163
}
164164

165+
/**
166+
* Adds all the specified scenes into the logic manager.
167+
*
168+
* @param scenes All the Scene objects to be added.
169+
*/
170+
public void addScenes(Scene... scenes) {
171+
for (Scene scene : scenes) {
172+
addScene(scene);
173+
}
174+
}
175+
176+
/**
177+
* Adds all the specified scenes into the logic manager.
178+
*
179+
* @param scenes The list of Scene objects to be added.
180+
*/
181+
public void addScenes(List<Scene> scenes) {
182+
for (Scene scene : scenes) {
183+
addScene(scene);
184+
}
185+
}
186+
187+
165188
/**
166189
* Removes the specified scene from the logic manager.
167190
*

0 commit comments

Comments
 (0)