Guest User

Coin

a guest
Feb 2nd, 2017
21
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.awt.image.BufferedImage;
  2. import ea.internal.io.ImageLoader;
  3. import java.io.*;
  4. /**
  5. * Write a description of class Coin here.
  6. *
  7. * @author (your name)
  8. * @version (a version number or a date)
  9. */
  10. public class Coin
  11. {
  12. private int animation = 0;
  13. public BufferedImage coinBil[] = new BufferedImage[6];
  14. public Coin(){
  15.  
  16. }
  17.  
  18. public int animiereCoin(){
  19. if(animation <5){
  20. animation++;
  21. }else{
  22. animation = 0;
  23. }
  24. return animation;
  25. }
  26.  
  27. public void ladeCoin(){
  28. for(int i =0; i<coinBil.length; i++){
  29. coinBil[i] = ImageLoader.loadExternalImage("object/coin/" + (i+1)+ ".png");
  30. }
  31. }
  32.  
  33.  
  34. }
RAW Paste Data