Description:
Add right click sound.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -46,12 +46,14 | |||
|
46 | 46 | private int height; |
|
47 | 47 | private int width; |
|
48 | 48 | |
|
49 | private SoundEffect sound; | |
|
49 | 50 | private SoundEffect startSound; |
|
50 | 51 | private SoundEffect endSound; |
|
51 | 52 | |
|
52 | 53 | public InputEngine(int menuBarHeight, Camera camera, |
|
53 | 54 | GraphicsDeviceManager gdm, int height, int width, |
|
54 |
SoundEffect s |
|
|
55 | SoundEffect sound, SoundEffect startSound, | |
|
56 | SoundEffect endSound) { | |
|
55 | 57 | //initialize to blank for now |
|
56 | 58 | this.keyboardPrev = new KeyboardState(); |
|
57 | 59 | this.menuBarHeight = menuBarHeight; |
@@ -60,6 +62,8 | |||
|
60 | 62 | this.graphicsDevice = gdm.GraphicsDevice; |
|
61 | 63 | this.height = height; |
|
62 | 64 | this.width = width; |
|
65 | ||
|
66 | this.sound = sound; | |
|
63 | 67 | this.startSound = startSound; |
|
64 | 68 | this.endSound = endSound; |
|
65 | 69 | } |
@@ -275,6 +279,7 | |||
|
275 | 279 | if (isPlaying && !io.WantCaptureMouse) { |
|
276 | 280 | if (mouseCur.RightButton == ButtonState.Pressed && mousePrev.RightButton == ButtonState.Released) |
|
277 | 281 | { |
|
282 | this.sound.Play(1.0f, 0.0f, 0.0f); | |
|
278 | 283 | SendMessage(new JumpCameraMessage {Movement = original_point}); |
|
279 | 284 | } |
|
280 | 285 |
@@ -46,6 +46,7 | |||
|
46 | 46 | private SpriteBatch tileBatch; |
|
47 | 47 | // #if DEBUG |
|
48 | 48 | private SoundEffect sound; |
|
49 | private SoundEffect clickSound; | |
|
49 | 50 | private SoundEffect clickStartSound; |
|
50 | 51 | private SoundEffect clickEndSound; |
|
51 | 52 | // #endif |
@@ -197,7 +198,7 | |||
|
197 | 198 | |
|
198 | 199 | // #if DEBUG |
|
199 | 200 | this.sound = Content.Load<SoundEffect>("FNASound"); |
|
200 |
|
|
|
201 | this.clickSound = Content.Load<SoundEffect>("Click"); | |
|
201 | 202 | this.clickStartSound = Content.Load<SoundEffect>("ClickPart1"); |
|
202 | 203 | this.clickEndSound = Content.Load<SoundEffect>("ClickPart2"); |
|
203 | 204 | // #endif |
@@ -272,7 +273,7 | |||
|
272 | 273 | |
|
273 | 274 | WorldBuilder.AddEngine(new InputEngine(Menu.MENU_BAR_HEIGHT, this.camera, gdm, |
|
274 | 275 | this.simulation.map.MapHeight, this.simulation.map.MapWidth, |
|
275 | this.clickStartSound, this.clickEndSound)); | |
|
276 | this.clickSound, this.clickStartSound, this.clickEndSound)); | |
|
276 | 277 | WorldBuilder.AddEngine(new UIEngine(this.Story)); |
|
277 | 278 | WorldBuilder.AddEngine(new DialogEngine(this.Story, this.grammar)); |
|
278 | 279 | |
@@ -432,6 +433,7 | |||
|
432 | 433 | batch.Dispose(); |
|
433 | 434 | // #if DEBUG |
|
434 | 435 | sound.Dispose(); |
|
436 | clickSound.Dispose(); | |
|
435 | 437 | clickStartSound.Dispose(); |
|
436 | 438 | clickEndSound.Dispose(); |
|
437 | 439 | // #endif |
You need to be logged in to leave comments.
Login now