UQdeco2800 / 2022-studio-2

MIT License
5 stars 1 forks source link

Continuous Walk Sound #314

Closed IsaacGraham128 closed 2 years ago

IsaacGraham128 commented 2 years ago

Description

Walking sound continues into pause menus and transition screens.

How To Reproduce

Steps to reproduce the behaviour:

Case 1:

  1. Hold movement key (W, A, S, or D)
  2. Open inventory , crafting screen, or pause menu

Or

Case 2:

  1. Hold movement key (W, A, S, or D)
  2. Begin level transition

Or

Case 3:

  1. Open inventory , crafting screen, or pause menu
  2. Hold movement key (W, A, S, or D)

Expected Behaviour

(Case 1 & 3) Sound will either continue to play during screens where it shouldn't or start playing during already open screens .

(Case 2) Sound will play through transition and will 'layer' with walking sound on level 2.

Additional Context

Problem lies within the utilisation and implementation of sound effects not having a proper cleanup or dispose function for opening menus or swapping screens.

Final Fix

IsaacGraham128 commented 2 years ago

Bug fix implemented in PlayerActions and MainGameScreen