Description:
Tweak sound.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -46,10 +46,12 | |||
|
46 | 46 | private int height; |
|
47 | 47 | private int width; |
|
48 | 48 | |
|
49 | private SoundEffect sound; | |
|
49 | private SoundEffect startSound; | |
|
50 | private SoundEffect endSound; | |
|
50 | 51 | |
|
51 | 52 | public InputEngine(int menuBarHeight, Camera camera, |
|
52 |
GraphicsDeviceManager gdm, int height, int width, |
|
|
53 | GraphicsDeviceManager gdm, int height, int width, | |
|
54 | SoundEffect startSound, SoundEffect endSound) { | |
|
53 | 55 | //initialize to blank for now |
|
54 | 56 | this.keyboardPrev = new KeyboardState(); |
|
55 | 57 | this.menuBarHeight = menuBarHeight; |
@@ -58,7 +60,8 | |||
|
58 | 60 | this.graphicsDevice = gdm.GraphicsDevice; |
|
59 | 61 | this.height = height; |
|
60 | 62 | this.width = width; |
|
61 | this.sound = sound; | |
|
63 | this.startSound = startSound; | |
|
64 | this.endSound = endSound; | |
|
62 | 65 | } |
|
63 | 66 | |
|
64 | 67 | |
@@ -308,7 +311,10 | |||
|
308 | 311 | } |
|
309 | 312 | else if (ImGui.IsAnyItemHovered()) { |
|
310 | 313 | if (mouseCur.LeftButton == ButtonState.Pressed && mousePrev.LeftButton == ButtonState.Released) { |
|
311 | this.sound.Play(1.0f, 0.0f, 0.0f); | |
|
314 | this.startSound.Play(1.0f, 0.0f, 0.0f); | |
|
315 | } | |
|
316 | else if (mouseCur.LeftButton == ButtonState.Released && mousePrev.LeftButton == ButtonState.Pressed) { | |
|
317 | this.endSound.Play(1.0f, 0.0f, 0.0f); | |
|
312 | 318 | } |
|
313 | 319 | } |
|
314 | 320 |
@@ -46,7 +46,8 | |||
|
46 | 46 | private SpriteBatch tileBatch; |
|
47 | 47 | // #if DEBUG |
|
48 | 48 | private SoundEffect sound; |
|
49 | private SoundEffect clickSound; | |
|
49 | private SoundEffect clickStartSound; | |
|
50 | private SoundEffect clickEndSound; | |
|
50 | 51 | // #endif |
|
51 | 52 | private SpriteFont monoFont; |
|
52 | 53 | private SpriteFont largeMonoFont; |
@@ -196,7 +197,9 | |||
|
196 | 197 | |
|
197 | 198 | // #if DEBUG |
|
198 | 199 | this.sound = Content.Load<SoundEffect>("FNASound"); |
|
199 | this.clickSound = Content.Load<SoundEffect>("Click"); | |
|
200 | // this.clickSound = Content.Load<SoundEffect>("Click"); | |
|
201 | this.clickStartSound = Content.Load<SoundEffect>("ClickPart1"); | |
|
202 | this.clickEndSound = Content.Load<SoundEffect>("ClickPart2"); | |
|
200 | 203 | // #endif |
|
201 | 204 | Tile.TileSetTexture = Content.Load<Texture2D>(@"merged_tileset"); |
|
202 | 205 | var texture = Content.Load<Texture2D>(@"solid_tileset"); |
@@ -268,7 +271,8 | |||
|
268 | 271 | Logging.Debug(this.Story.ContinueMaximally()); |
|
269 | 272 | |
|
270 | 273 | WorldBuilder.AddEngine(new InputEngine(Menu.MENU_BAR_HEIGHT, this.camera, gdm, |
|
271 |
this.simulation.map.MapHeight, this.simulation.map.MapWidth, |
|
|
274 | this.simulation.map.MapHeight, this.simulation.map.MapWidth, | |
|
275 | this.clickStartSound, this.clickEndSound)); | |
|
272 | 276 | WorldBuilder.AddEngine(new UIEngine(this.Story)); |
|
273 | 277 | WorldBuilder.AddEngine(new DialogEngine(this.Story, this.grammar)); |
|
274 | 278 | |
@@ -428,7 +432,8 | |||
|
428 | 432 | batch.Dispose(); |
|
429 | 433 | // #if DEBUG |
|
430 | 434 | sound.Dispose(); |
|
431 | clickSound.Dispose(); | |
|
435 | clickStartSound.Dispose(); | |
|
436 | clickEndSound.Dispose(); | |
|
432 | 437 | // #endif |
|
433 | 438 | Tile.TileSetTexture.Dispose(); |
|
434 | 439 | Logging.Success("Disposed of Tile texture."); |
@@ -92,6 +92,12 | |||
|
92 | 92 | <None Include="Content\Click.wav"> |
|
93 | 93 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
|
94 | 94 | </None> |
|
95 | <None Include="Content\ClickPart1.wav"> | |
|
96 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
|
97 | </None> | |
|
98 | <None Include="Content\ClickPart2.wav"> | |
|
99 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
|
100 | </None> | |
|
95 | 101 | <None Include="packages.config" /> |
|
96 | 102 | <!-- <None Include="Content\part4_tileset.png"> --> |
|
97 | 103 | <!-- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> --> |
You need to be logged in to leave comments.
Login now