Browse Source

Fixed language on option menu

pull/1/head
theo@manjaro 11 months ago
parent
commit
d892b9f02f
  1. 20
      credits.md
  2. 1
      gamedata/game.py
  3. 4
      gamedata/objects/gameover.py
  4. 2
      gamedata/objects/menu/optionmenu.py
  5. 2
      gamedata/objects/sliders/bgmslider.py
  6. 2
      gamedata/objects/sliders/sfxslider.py
  7. 3
      gamedata/scenes.py
  8. BIN
      gamedata/sounds/bgm/gameover.ogg
  9. BIN
      gamedata/sounds/bgm/ingame.ogg
  10. BIN
      gamedata/sounds/bgm/menu.ogg

20
credits.md

@ -25,3 +25,23 @@ I edited some textures to fit the [Famicube palette](https://lospec.com/palette-
## Dust particles
[GraphxKid - OpenGameArt](https://opengameart.org/content/items-and-elements)
# Audio
## Sound effects
I generated almost all the different audio effects using [JSFXR by Eric Fredricksen](https://sfxr.me/), except for the pinmik's voice clips that I recorded myself and slightly edited using [Audacity](https://www.audacityteam.org/)
## Musics
### Main menu
[Scribe - Adventure Time](https://opengameart.org/content/adventure-time)
### Game over
[Augmentality - Story Time](https://opengameart.org/content/story-time)
### Ingame
[Scribe - Summer Park](https://opengameart.org/content/summer-park-8bit-tune-loop)

1
gamedata/game.py

@ -74,6 +74,7 @@ class Game():
# Je charge la scene de base
scenes.main(self)
self.sound_lib["bgm/menu.ogg"].play(-1)
def set_camera(self,posx,posy):
self.globals["camerax"], self.globals["cameray"] = posx,posy

4
gamedata/objects/gameover.py

@ -9,6 +9,8 @@ class GameOver(BaseObject):
# Back button function
def fnBack(self,game):
game.scene = game.scenes.main
self.game.sound_lib["bgm/gameover.ogg"].stop()
self.game.sound_lib["bgm/menu.ogg"].play(-1)
# Creating the back button
btn = Button(int(game.DISPLAY_WIDTH/4),int(game.DISPLAY_HEIGHT*0.8),game,game.DISPLAY_WIDTH//2,int(game.DISPLAY_HEIGHT*0.1))
@ -111,6 +113,8 @@ class GameOver(BaseObject):
self.sfxscore.play()
self.game.sound_lib["bgm/gameover.ogg"].play(-1)
if self.launched:
self.flashtimer.tick(self.game.dt)

2
gamedata/objects/menu/optionmenu.py

@ -8,7 +8,7 @@ class OptionMenu(menu.Menu):
def fnRetour(self,game):
game.lib.savesettings(game.datadir,bgm=game.globals["bgmvolume"],sfx=game.globals["sfxvolume"],filename=game.settingsname)
game.scene = game.scenes.main
btnRetour= {"name":"Retour","function": fnRetour}
btnRetour= {"name":"Back","function": fnRetour}
# Initialisation de la grille du menu
self.grid = [

2
gamedata/objects/sliders/bgmslider.py

@ -6,7 +6,7 @@ class BGMSlider(Slider):
self.currentvalue = self.getvalue()
self.posttext = " % Musique"
self.posttext = " % Music volume"
def change(self):
self.game.globals["bgmvolume"] = self.currentvalue/100

2
gamedata/objects/sliders/sfxslider.py

@ -6,7 +6,7 @@ class SFXSlider(Slider):
self.currentvalue = self.getvalue()
self.posttext = " % Effets Sonores"
self.posttext = " % SFX volume"
def change(self):
self.game.globals["sfxvolume"] = self.currentvalue/100

3
gamedata/scenes.py

@ -32,6 +32,8 @@ def ingame(game):
game.globals["camerax"] = 0
game.globals["cameray"] = 0
game.gameloop.summon(Manager(game))
game.sound_lib["bgm/menu.ogg"].stop()
game.sound_lib["bgm/ingame.ogg"].play(-1)
def options(game):
game.gameloop.delname("Button")
@ -53,3 +55,4 @@ def gameover(game):
game.gameloop.reinit()
go = GameOver(game)
game.gameloop.summon(go)
game.sound_lib["bgm/ingame.ogg"].stop()

BIN
gamedata/sounds/bgm/gameover.ogg

Binary file not shown.

BIN
gamedata/sounds/bgm/ingame.ogg

Binary file not shown.

BIN
gamedata/sounds/bgm/menu.ogg

Binary file not shown.
Loading…
Cancel
Save