Package com.tankz.components

Examples of com.tankz.components.SoundFile


    world.deleteEntity(e);
  }

  @Override
  protected void added(Entity e) {
    SoundFile soundFile = soundMapper.get(e);

    try {
      Sound sound = new Sound(soundFile.getSoundFile());
      sound.play(1, 0.3f);
    } catch (SlickException e1) {
      e1.printStackTrace();
    }
  }
View Full Code Here


    return e;
  }

  public static Entity createSound(World world, String soundFileName) {
    Entity sound = world.createEntity();
    sound.addComponent(new SoundFile(soundFileName));
    sound.addToWorld();
    return sound;
  }
View Full Code Here

TOP

Related Classes of com.tankz.components.SoundFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.