Glowball.java
上传用户:qinghua
上传日期:2022-06-06
资源大小:523k
文件大小:1k
源码类别:

J2ME

开发平台:

Java

  1. import javax.microedition.midlet.*;
  2. import javax.microedition.lcdui.*;
  3. public class Glowball{
  4. public byte gbc;
  5. boolean glowflag;
  6. public int glowballx,glowbally;
  7.     
  8.     public Glowball(int glowballx,int glowbally){
  9.      this.glowballx = glowballx;
  10.      this.glowbally =glowbally;
  11.     
  12.     }
  13.     
  14.     public void  ballGlow(Graphics g)
  15. {
  16. if(gbc ==0)
  17. {
  18.      g.drawImage(HauntedCastle.power1,glowballx+HauntedCastle.panx,glowbally,Graphics.TOP|Graphics.LEFT); 
  19. gbc++;
  20. }
  21. else if(gbc==1)
  22. {
  23.     g.drawImage(HauntedCastle.power2,glowballx+HauntedCastle.panx,glowbally,Graphics.TOP|Graphics.LEFT); 
  24.      gbc =0;
  25. }
  26. }
  27. }