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

📄 entitypath.java

📁 一个很不错的j2me的rpg游戏的源码
💻 JAVA
字号:
package mobileRPG.client;

public class EntityPath {
	
	protected int xTarget;
	protected int yTarget;
	protected EntityPath next;
	protected boolean completed, active;
	
	public EntityPath(int xTarget, int yTarget, EntityPath next) {
		this.xTarget = xTarget;
		this.yTarget = yTarget;
		this.next = next;
		completed = false;
		active = false;
	}
	
	public int getXTarget() {return xTarget;}
	public int getYTarget() {return yTarget;}
	
	public boolean isCompleted() {return completed;}
	public void setCompleted() {completed = true;}
	
	public boolean isActive() {return active;}
	public void setActive(boolean active) {this.active = active;}
	
	public void setNext(EntityPath next) {this.next = next;}
	
	public boolean isPush() {
		return false;
	}
	
	public EntityPath getNext() {
		if (next != null) {
			// If the next path has already been completed, remove it from the list
			if (next.isCompleted()) {
				next = null;
			}
		}
		return next;
	}
	
	public EntityPath getLast() {
		if (getNext() == null) {
			// If this is the last item on the list:
			
			// If this path has already completed, don't return it.
			if (this.isCompleted()) {return null;}
			
			// Otherwise return this
			return this;
			
		}
		return next.getLast();
	}

}

⌨️ 快捷键说明

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