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

📄 entity.java

📁 j2me实现的一款小游戏
💻 JAVA
字号:
package istarion.core;

public abstract class Entity
{
	public static int IS_MOBILE		= 0;
	public static int IS_ITEM 		= 1;

	protected String __name;
	private char __symbol;
	private int __color;


	public Entity(String n, char s, int c)
	{
		setName(n);
		setSymbol(s);
		setColor(c);
	}


	public String getName()
	{
		return __name;
	}


	public void setName(String s)
	{
		__name = s;
		if (__name.length() > 16)
			__name = __name.substring(0,16);
	}


	public char getSymbol()
	{
		return __symbol;
	}


	public void setSymbol(char s)
	{
		__symbol = s;
	}


	public int getColor()
	{
		return __color;
	}


	public void setColor(int c)
	{
		__color = c;
		if ((__color > 0xFFFFFF) || (__color < 0)) __color = 0;
	}

	/**
	 * Identifies the type of the Entity.
	 * Implementations must return IS_ITEM or
	 * IS_MOBILE.
	 */
	public abstract int getEntityType();



}

⌨️ 快捷键说明

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