toolstroke: actually make sounds when tool is applied
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@649 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
09932e0f5d
commit
66fc6f58d2
2 changed files with 10 additions and 5 deletions
|
@ -87,6 +87,11 @@ class ToolEffect implements ToolEffectIfc
|
|||
}
|
||||
}
|
||||
|
||||
for (ToolPreview.SoundInfo si : preview.sounds)
|
||||
{
|
||||
city.makeSound(si.x, si.y, si.sound);
|
||||
}
|
||||
|
||||
if (anyFound && preview.cost != 0) {
|
||||
city.spend(preview.cost);
|
||||
return ToolResult.SUCCESS;
|
||||
|
|
|
@ -15,14 +15,14 @@ public class ToolPreview implements ToolEffectIfc
|
|||
|
||||
public static class SoundInfo
|
||||
{
|
||||
public int dx;
|
||||
public int dy;
|
||||
public int x;
|
||||
public int y;
|
||||
public Sound sound;
|
||||
|
||||
SoundInfo(int dx, int dy, Sound sound)
|
||||
SoundInfo(int x, int y, Sound sound)
|
||||
{
|
||||
this.dx = dx;
|
||||
this.dy = dy;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.sound = sound;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue