This edition of Micropolis, written for the Java desktop platform, is fairly feature complete. I believe the only missing functionality is that of loading the built-in scenarios, and this can be implemented if there is any demand for it. I will soon update the home page at http://code.google.com/p/micropolis/ with downloadable packages of this edition of the software. git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@528 d9718cc8-9f43-0410-858b-315f434eb58c
47 lines
1.2 KiB
Java
47 lines
1.2 KiB
Java
// This file is part of MicropolisJ.
|
|
// Copyright (C) 2013 Jason Long
|
|
// Portions Copyright (C) 1989-2007 Electronic Arts Inc.
|
|
//
|
|
// MicropolisJ is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU GPLv3, with additional terms.
|
|
// See the README file, included in this distribution, for details.
|
|
|
|
package micropolisj.engine;
|
|
|
|
import java.net.URL;
|
|
|
|
/**
|
|
* Enumerates the various sounds that the city may produce.
|
|
* The engine is not responsible for actually playing the sound. That task
|
|
* belongs to the front-end (i.e. the user interface).
|
|
*/
|
|
public enum Sound
|
|
{
|
|
EXPLOSION_LOW ("explosion-low"),
|
|
EXPLOSION_HIGH("explosion-high"),
|
|
EXPLOSION_BOTH("explosion-low"),
|
|
UHUH ("bop"),
|
|
SORRY ("bop"),
|
|
BUILD ("layzone"),
|
|
BULLDOZE (null),
|
|
HONKHONK_LOW ("honkhonk-low"),
|
|
HONKHONK_MED ("honkhonk-med"),
|
|
HONKHONK_HIGH ("honkhonk-high"),
|
|
HONKHONK_HI ("honkhonk-hi"),
|
|
SIREN ("siren"),
|
|
HEAVYTRAFFIC ("heavytraffic"),
|
|
MONSTER ("zombie-roar-5");
|
|
|
|
String wavName;
|
|
private Sound(String wavName)
|
|
{
|
|
this.wavName = wavName;
|
|
}
|
|
|
|
public URL getAudioFile()
|
|
{
|
|
String n2 = "/sounds/"+wavName+".wav";
|
|
URL u = Sound.class.getResource(n2);
|
|
return u;
|
|
}
|
|
}
|