当前位置: 首页>>代码示例>>Java>>正文


Java JGEngineInterface类代码示例

本文整理汇总了Java中jgame.impl.JGEngineInterface的典型用法代码示例。如果您正苦于以下问题:Java JGEngineInterface类的具体用法?Java JGEngineInterface怎么用?Java JGEngineInterface使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JGEngineInterface类属于jgame.impl包,在下文中一共展示了JGEngineInterface类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setEngine

import jgame.impl.JGEngineInterface; //导入依赖的package包/类
/** Set the engine to connect to when a new object is created.  This
* should be called only by the JGEngine implementation.
* @param engine  pass null to indicate the engine has exited.
* @return true if success; false if other engine already running. */
public static boolean setEngine(JGEngineInterface engine) {
	if (engine==null) {
		default_engine=null;
		return true;
	}
	if (default_engine!=null) return false;
	default_engine=engine;
	// copy some constants from engine for fast access
	viewwidth=engine.viewWidth();
	viewheight=engine.viewHeight();
	tilewidth=engine.tileWidth();
	tileheight=engine.tileHeight();
	updateEngineSettings();
	return true;
}
 
开发者ID:chinnychin19,项目名称:CS308_Proj1,代码行数:20,代码来源:JGObject.java

示例2: initObject

import jgame.impl.JGEngineInterface; //导入依赖的package包/类
private void initObject(JGEngineInterface engine,
String name,int collisionid) {
	this.eng=engine;
	this.name=name;
	colid=collisionid;
	// XXX the test on suspend should really be done after the
	// constructor of the subclass is finished, in case the position is
	// changed later in the constructor.
	if ((int)expiry==suspend_off_view
	||  (int)expiry==suspend_off_view_expire_off_pf) {
		if (!isInView(eng.getOffscreenMarginX(),eng.getOffscreenMarginY()))
			suspend();
	}
	eng.markAddObject(this);
}
 
开发者ID:chinnychin19,项目名称:CS308_Proj1,代码行数:16,代码来源:JGObject.java


注:本文中的jgame.impl.JGEngineInterface类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。