Description:
Add right click sound.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r580:5935315e1a82 -

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