⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logo.java

📁 自己做的一个JAVA射击小游戏!可以上真机玩的!
💻 JAVA
字号:
import javax.microedition.lcdui.*;
public class Logo
{
	Image logo1=null;
	Image logo=null;
	AcCV ac=null;
	int which=0;
	int Num=0;
	public Logo(AcCV ac)
	{
		this.ac=ac;
		try
		{
			logo1=Image.createImage("/logo1.png");
			logo=Image.createImage("/logo.png");
		}
		catch(Exception e)
		{
			System.out.println("logo图片错误");
			e.printStackTrace();
		}
	}
	
	public void paint(Graphics g)
	{
		if(which==0)
		{
			g.setColor(0xffffff);
			g.fillRect(0, 0, this.ac.getWidth(),this.ac.getHeight());
			g.drawImage(logo1, (this.ac.getWidth()-this.logo1.getWidth())/2,(this.ac.getHeight()-this.logo1.getHeight())/2, 0);
		}
		else if(Num>51)
		{
			g.setColor(0x000000);
			g.fillRect(0, 0, this.ac.getWidth(),this.ac.getHeight());
			g.drawImage(logo, (this.ac.getWidth()-this.logo.getWidth())/2,(this.ac.getHeight()-this.logo.getHeight())/2, 0);
		}
		else
		{
			AcCV.state=3;
		}
		update(1);
	}
	public void update(int key) 
	{
		if(Num<30)
		{
			Num++;
		}
		else if(Num==30)
		{
				which=1;
				Num=90;
		}
		else if(Num>51)
		{
			Num--;
		}
	}
	public void recycleRes() 
	{
		logo1=null;
		logo=null;
		ac=null;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -