Ejemplo n.º 1
0
  /** Plays the Error sound at given location depending on the machine TEMPORARY SOLUTION~~~ */
  public void playErrorSound(Location machineLocation, MachineType machineType) {
    Manager manager;
    switch (machineType) {
      case OREGIN:
        manager = getManager(OreGinManager.class);
        break;
      case CLOAKER:
        manager = getManager(CloakerManager.class);
        break;
      default:
        manager = null;
        break;
    }

    if (manager != null) {
      Machine machine = manager.getMachine(machineLocation);

      if (machine != null) {
        switch (machineType) {
          case OREGIN:
            OreGinSoundCollection.getErrorSound().playSound(machineLocation);
            break;
          case CLOAKER:
            CloakerSoundCollection.getErrorSound().playSound(machineLocation);
            break;
          case SMELTER:
            break;
        }
      }
    }
  }