本文整理汇总了Java中net.gtaun.util.event.EventManagerNode类的典型用法代码示例。如果您正苦于以下问题:Java EventManagerNode类的具体用法?Java EventManagerNode怎么用?Java EventManagerNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EventManagerNode类属于net.gtaun.util.event包,在下文中一共展示了EventManagerNode类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: editObject
import net.gtaun.util.event.EventManagerNode; //导入依赖的package包/类
@Override
public void editObject(Player player) {
visibleObjects.entrySet().stream().filter(set -> !set.getValue().isDestroyed() && set.getKey() == player)
.forEach(set -> {
set.getKey().editPlayerObject(set.getValue());
final EventManagerNode node = eventManagerNode.createChildNode();
node.registerHandler(PlayerEditPlayerObjectEvent.class, HandlerPriority.NORMAL, Attentions.create().object(player).object(set.getValue()), (e) -> {
if(e.getObject().getId() == SampObject.INVALID_ID) return;
PlayerEditDynamicObject event = new PlayerEditDynamicObject(player, this, e.getEditResponse(), e.getNewLocation(), e.getNewRotation());
eventManager.dispatchEvent(event, player, this);
if(e.getEditResponse() == ObjectEditResponse.CANCEL || e.getEditResponse() == ObjectEditResponse.FINAL) {
if (event.isSave()) {
this.location = e.getNewLocation();
this.rotation = e.getNewRotation();
update();
}
node.cancelAll();
node.destroy();
}
});
});
}
开发者ID:Shoebill,项目名称:shoebill-streamer,代码行数:23,代码来源:DynamicSampObjectImpl.java
示例2: checkIfAllObjectsMoved
import net.gtaun.util.event.EventManagerNode; //导入依赖的package包/类
private void checkIfAllObjectsMoved(EventManagerNode stopEventNode, float x, float y, float z, float rX, float rY, float rZ) {
if(movingObjectsForPlayer.size() == 0) {
stopEventNode.cancelAll();
this.location = this.location.clone();
this.location.set(x, y, z);
this.rotation = new Vector3D(rX, rY, rZ);
}
}
开发者ID:Shoebill,项目名称:shoebill-streamer,代码行数:9,代码来源:DynamicSampObjectImpl.java
示例3: getEventManagerInstance
import net.gtaun.util.event.EventManagerNode; //导入依赖的package包/类
public EventManagerNode getEventManagerInstance() {
return eventManagerNode;
}
开发者ID:Alf21,项目名称:textdraw-system,代码行数:4,代码来源:TextdrawSystem.java
注:本文中的net.gtaun.util.event.EventManagerNode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论