package boxs;

import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.Sound;

import personnage.Personnage;


public class AmmoBoxs extends Box
{
	public AmmoBoxs() throws SlickException
	{
		super();
		img = new Image("res/boxs/munitions.png");
	}
	@Override
	public void action(Personnage perso)
	{
		perso.munitions = (perso.munitions + 30 > 50)?50:perso.munitions+30;
		try {
			new Sound("res/sons/ammo.ogg")
			.play();
		} catch (SlickException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
