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

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

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

Entity.getWorld介绍

[英]Returns the world this entity belongs to.
[中]

代码示例

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

@Override
@SuppressWarnings("unchecked")
public void process(Entity e) {
  if ( m == null ) {
    m = M.getFor(a.getClass(), e.getWorld());
  }
  // mirror or create component.
  ((Mirrorable) m.create(e)).set(a);
}

代码示例来源:origin: net.mostlyoriginal.artemis-odb/contrib-plugin-operations

@Override
@SuppressWarnings("unchecked")
public void process(Entity e) {
  final M m = M.getFor(a.getClass(),e.getWorld());
  ((Mirrorable)m.create(e)).set(a);
}

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

public void transmute(Entity e) {
    if (transmuter == null) {
      EntityTransmuterFactory factory = new EntityTransmuterFactory(e.getWorld());
      for (int i = 0, s = componentTypes.size(); s > i; i++)
        factory.add(componentTypes.get(i));
      transmuter = factory.build();
    }
    transmuter.transmute(e);
  }
}

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

@Override
@SuppressWarnings("unchecked")
public void process(Entity e) {
  final M m = M.getFor(a.getClass(),e.getWorld());
  ((Mirrorable)m.create(e)).set(a);
}

代码示例来源:origin: net.mostlyoriginal.artemis-odb/contrib-plugin-operations

@Override
@SuppressWarnings("unchecked")
public void process(Entity e) {
  if ( m == null ) {
    m = M.getFor(a.getClass(), e.getWorld());
  }
  // mirror or create component.
  ((Mirrorable) m.create(e)).set(a);
}

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

public void transmute(Entity e) {
    if (transmuter == null) {
      EntityTransmuterFactory factory = new EntityTransmuterFactory(e.getWorld());
      for (int i = 0, s = componentTypes.size(); s > i; i++)
        factory.add(componentTypes.get(i));
      transmuter = factory.build();
    }
    transmuter.transmute(e);
  }
}

代码示例来源:origin: net.mostlyoriginal.artemis-odb/contrib-plugin-operations

@SuppressWarnings("unchecked")
protected void applyTween(Entity e, float a) {
  M m = M.getFor(((Component) this.a).getClass(), e.getWorld());
  // apply tween to component, create if missing.
  ((Tweenable) m.create(e))
      .tween(this.a, b, MathUtils.clamp(a, 0, 1));
}

代码示例来源:origin: net.mostlyoriginal.artemis-odb/contrib-plugin-operations

@SuppressWarnings("unchecked")
protected final void applyTween(Entity e, float a) {
  if (m == null) {
    // resolve component mapper if not set yet.
    // gets cleared every reset for non managed tweens.
    m = M.getFor(this.a.getClass(), e.getWorld());
  }
  // apply tween to component, create if missing.
  ((Tweenable) m.create(e))
      .tween(this.a, b, MathUtils.clamp(a, 0, 1));
}

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

@SuppressWarnings("unchecked")
protected void applyTween(Entity e, float a) {
  M m = M.getFor(((Component) this.a).getClass(), e.getWorld());
  // apply tween to component, create if missing.
  ((Tweenable) m.create(e))
      .tween(this.a, b, MathUtils.clamp(a, 0, 1));
}

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

@SuppressWarnings("unchecked")
protected final void applyTween(Entity e, float a) {
  if (m == null) {
    // resolve component mapper if not set yet.
    // gets cleared every reset for non managed tweens.
    m = M.getFor(this.a.getClass(), e.getWorld());
  }
  // apply tween to component, create if missing.
  ((Tweenable) m.create(e))
      .tween(this.a, b, MathUtils.clamp(a, 0, 1));
}

相关文章