From 8138fb6329ac486f10e79868e930db38c0ccac60 Mon Sep 17 00:00:00 2001 From: iegod Date: Thu, 31 Aug 2023 17:04:40 -0400 Subject: [PATCH] Updated for new scenes. --- examples/splashmenu/main.go | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/examples/splashmenu/main.go b/examples/splashmenu/main.go index dc8d8e5..9ad2c6c 100644 --- a/examples/splashmenu/main.go +++ b/examples/splashmenu/main.go @@ -32,9 +32,12 @@ func main() { // Example loading of two scenes func loadScenes(m *groovy.Manager) { //call the loaders for each scene - loadSplash(m) - loadBsoft(m) - loadMenu(m) + //loadSplash(m) + //loadBsoft(m) + //loadMenu(m) + //loadNoise(m) + //loadSplashpad(m) + loadParallax(m) //reset the manager to start scene 1 m.ResetScenes() @@ -55,8 +58,10 @@ func loadMenu(m *groovy.Manager) { 1: {Description: "splash", SelectionEvent: groovy.RESET, Mapping: ebiten.Key1}, 2: {Description: "bsoft", SelectionEvent: groovy.COMPLETED, Mapping: ebiten.Key2}, 3: {Description: "menu"}, - 4: {Description: "swing"}, - 5: {Description: "exit", SelectionEvent: groovy.ENDGAME, Mapping: ebiten.Key5}, + 4: {Description: "noise", SelectionEvent: groovy.COMPLETED, Mapping: ebiten.Key4}, + 5: {Description: "guy", SelectionEvent: groovy.COMPLETED, Mapping: ebiten.Key5}, + 6: {Description: "parallax", SelectionEvent: groovy.COMPLETED, Mapping: ebiten.Key6}, + 7: {Description: "exit", SelectionEvent: groovy.ENDGAME, Mapping: ebiten.Key7}, }) m.AddScene(&sceneMenu) @@ -74,3 +79,19 @@ func loadBsoft(m *groovy.Manager) { sceneBsoft := splashmenu.NewBsoft() m.AddScene(&sceneBsoft) } + +func loadNoise(m *groovy.Manager) { + sceneNoisy := splashmenu.NewNoisy() + m.AddScene(&sceneNoisy) +} + +func loadSplashpad(m *groovy.Manager) { + sceneSplashpad := splashmenu.NewSplashPad() + m.AddScene(&sceneSplashpad) +} + +func loadParallax(m *groovy.Manager) { + sceneParallax := splashmenu.NewParallax() + m.AddScene(&sceneParallax) + sceneParallax.InitializeParallax() +}