com.artemis.Entity.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(275)

本文整理了Java中com.artemis.Entity.<init>()方法的一些代码示例,展示了Entity.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.<init>()方法的具体详情如下:
包路径:com.artemis.Entity
类名称:Entity
方法名:<init>

Entity.<init>介绍

[英]Create an entity for the specified world.
[中]为指定的世界创建实体。

代码示例

代码示例来源:origin: junkdog/artemis-odb

public static Entity create(World world, int entityId) {
    return new Entity(world, entityId);
  }
}

代码示例来源:origin: apotapov/gdx-artemis

@Override
protected Entity newObject() {
  return new Entity(world);
}

代码示例来源:origin: net.onedaybeard.artemis/artemis-odb-serializer

public static Entity create(World world, int entityId) {
    return new Entity(world, entityId);
  }
}

代码示例来源:origin: junkdog/artemis-odb

/**
 * Instantiates an Entity without registering it into the world.
 * @param id The ID to be set on the Entity
 */
private Entity createEntity(int id) {
  Entity e = new Entity(world, id);
  if (e.id >= entities.getCapacity()) {
    growEntityStores();
  }
  // can't use unsafe set, as we need to track highest id
  // for faster iteration when syncing up new subscriptions
  // in ComponentManager#synchronize
  entities.set(e.id, e);
  return e;
}

代码示例来源:origin: net.onedaybeard.artemis/artemis-odb

/**
 * Instantiates an Entity without registering it into the world.
 * @param id The ID to be set on the Entity
 */
private Entity createEntity(int id) {
  Entity e = new Entity(world, id);
  if (e.id >= entities.getCapacity()) {
    growEntityStores();
  }
  // can't use unsafe set, as we need to track highest id
  // for faster iteration when syncing up new subscriptions
  // in ComponentManager#synchronize
  entities.set(e.id, e);
  return e;
}

相关文章