• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java WorldConfiguration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Dispatch_TwoListeningSystem_BothCalled

import com.artemis.WorldConfiguration; //导入依赖的package包/类
@Test
public void Dispatch_TwoListeningSystem_BothCalled() {
    WorldConfiguration config = new WorldConfiguration();
    final EventSystem eventManager = new EventSystem();
    config.setSystem(eventManager);
    ReceiveSystem s1 = new ReceiveSystem();
    config.setSystem(s1);
    ReceiveSystem2 s2 = new ReceiveSystem2();
    config.setSystem(s2);
    config.setSystem(new DispatchSystem());

    World w = new World(config);
    w.process();

    // no exception = success
    assertEquals(1, s1.count);
    assertEquals(1, s2.count);
}
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:19,代码来源:InterSystemEventTest.java


示例2: test_Dispatch_TwoListeningSystem_BothCalled

import com.artemis.WorldConfiguration; //导入依赖的package包/类
public void test_Dispatch_TwoListeningSystem_BothCalled() {

        final WorldConfiguration config = new WorldConfiguration();
        final EventSystem eventManager = new EventSystem();
        config.setSystem(eventManager);
        ReceiveTestSystem s1 = new ReceiveTestSystem();
        config.setSystem(s1);
        ReceiveTestSystem2 s2 = new ReceiveTestSystem2();
        config.setSystem(s2);
        config.setSystem(new DispatchTestSystem());

        World w = new World(config);
        w.process();
        // no exception = success
        assertEquals(1, s1.count);
        assertEquals(1, s2.count);
    }
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:18,代码来源:InterSystemEventGwtTest.java


示例3: DeferredSystem_EntityAdded_RegisteredWithPrincipal

import com.artemis.WorldConfiguration; //导入依赖的package包/类
@Test
public void DeferredSystem_EntityAdded_RegisteredWithPrincipal() {

	EntityProcessPrincipal principal = mock(EntityProcessPrincipal.class);

	final WorldConfiguration config = new WorldConfiguration();
	config.setSystem(new TestDeferredSystem(Aspect.all(EmptyComponent.class), principal));
	// setup world and single entity.
	World w = new World(config);

	Entity myEntity = new EntityBuilder(w).with(EmptyComponent.class).build();
	w.process();

	// ensure it gets registered with the principal
	verify(principal, times(1)).registerAgent(eq(myEntity.getId()), any(EntityProcessAgent.class));
}
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:17,代码来源:DeferredEntityProcessingSystemTest.java


示例4: DeferredSystem_EntityRemoved_UnregisteredFromPrincipal

import com.artemis.WorldConfiguration; //导入依赖的package包/类
@Test
public void DeferredSystem_EntityRemoved_UnregisteredFromPrincipal() {

	EntityProcessPrincipal principal = mock(EntityProcessPrincipal.class);

	// setup world and single entity.
	WorldConfiguration config = new WorldConfiguration();
	config.setSystem(new TestDeferredSystem(Aspect.all(EmptyComponent.class), principal));
	World w = new World(config);
	Entity myEntity = new EntityBuilder(w).with(EmptyComponent.class).build();
	w.process();
	w.deleteEntity(myEntity);
	w.process();

	// ensure it gets registered with the principal
	verify(principal, times(1)).unregisterAgent(eq(myEntity.getId()), any(EntityProcessAgent.class));
}
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:18,代码来源:DeferredEntityProcessingSystemTest.java


示例5: init

import com.artemis.WorldConfiguration; //导入依赖的package包/类
public void init() {
    WorldConfiguration config = new WorldConfigurationBuilder()
            .with(new NetIdManager())
            .with(new CollisionSystem())
            .with(new ScriptSystem())
            .with(new NetworkEntitiesSystem())
            .build();
    mWorld = new World(config);
}
 
开发者ID:AlexMog,项目名称:SurvivalMMO,代码行数:10,代码来源:WorldManager.java


示例6: restart

import com.artemis.WorldConfiguration; //导入依赖的package包/类
public void restart() {
	
	setBatch(new SpriteBatch());
	
	loadLevel(getLevel());
	
	setMapRenderer(new OrthogonalTiledMapRenderer(map));
	
	//systems tick in order added by default
	WorldConfiguration worldConfig = new WorldConfiguration();
	worldConfig.setSystem(new WorldTimer(GameSettings.tickDelayGame));
	worldConfig.setSystem(new GameInput(GameSettings.tickDelayGame));
	//process world
	worldConfig.setSystem(new WorldSim(GameSettings.tickDelayGame));
	//process physics
	worldConfig.setSystem(new PhysicsWrapper(GameSettings.tickDelayGame));
	//process entities that respond to physics
	worldConfig.setSystem(new SpriteSim(GameSettings.tickDelayGame));
	worldConfig.setSystem(new MapRender());
	worldConfig.setSystem(new SpriteRender());
	worldConfig.setSystem(new SpriteRenderHUD());
	worldConfig.setSystem(new HUDRender());
	
	worldArtemis = new World(worldConfig);
	
	worldBox2D = new com.badlogic.gdx.physics.box2d.World(new Vector2(0, 0), true);

       loadLevelObjects();
	
	respawnPlayer();
}
 
开发者ID:Corosauce,项目名称:AI_TestBed_v3,代码行数:32,代码来源:Level.java


示例7: GameEngine

import com.artemis.WorldConfiguration; //导入依赖的package包/类
private GameEngine() {
	final InputMultiplexer inputMultiplexer = new InputMultiplexer();
	inputMultiplexer.addProcessor(UserIntefaceInputProcessor.getInstance());
	inputMultiplexer.addProcessor(InputSystem.getInstance());
	Gdx.input.setInputProcessor(inputMultiplexer);
	final WorldConfiguration config = new WorldConfiguration();
	Systems.setSystems(config);
	world = new World(config);
	ComponentMappers.mapComponents(world);
	Archetypes.createArchetypes(world);
}
 
开发者ID:davidbecker,项目名称:taloonerrl,代码行数:12,代码来源:GameEngine.java


示例8: setSystems

import com.artemis.WorldConfiguration; //导入依赖的package包/类
/**
 * adds the systems to the given {@link WorldConfiguration}
 *
 * @param config
 *            configuration to add systems to
 */
public static void setSystems(final WorldConfiguration config) {
	// order is important! systems are processed in given order
	config.setSystem(TURN_PROCESS_SYSTEM);
	config.setSystem(BLOCKING_TILE_CHECK_SYSTEM);
	config.setSystem(CONTROLLER_SYSTEM);
	config.setSystem(OFFSET_SYSTEM);
	config.setSystem(TURN_TAKEN_SYSTEM);
	config.setSystem(CAMERA_SYSTEM);
	config.setSystem(FOV_UPDATER_SYSTEM);
	config.setSystem(HIGHLIGHT_UPDATE_SYSTEM);
	config.setSystem(MAP_OVERLAY_PREPARER_SYSTEM);
}
 
开发者ID:davidbecker,项目名称:taloonerrl,代码行数:19,代码来源:Systems.java


示例9: Overworld

import com.artemis.WorldConfiguration; //导入依赖的package包/类
public Overworld() {
  assetManager = new AssetManager();

  camera = new HelixCamera(60, new Vector3(0, -30, 30), .01f, 300);

  WorldConfiguration worldConfiguration 
      = new WorldConfiguration().register(assetManager)
                                .register(camera);
  world = new World(worldConfiguration);

  world.setManager(new UuidEntityManager());
  world.setManager(new TextureManager());
  world.setManager(new TagManager());
  world.setManager(new GroupManager());
  world.setManager(new AreaManager());
  world.setManager(new WeatherMan());
  world.setManager(new LocalAmbienceManager());
  world.setManager(displayableIntermediary = new DisplayableIntermediary());
  world.setManager(cameraIntermediary = new CameraIntermediary());

  world.setSystem(new CameraControlSystem());
  world.setSystem(new TileHighlightingSystem());
  world.setSystem(new TilePermissionsEditingSystem());
  world.setSystem(new RenderingSystem());

  world.initialize();
}
 
开发者ID:fauu,项目名称:HelixEngine,代码行数:28,代码来源:Overworld.java


示例10: Overworld

import com.artemis.WorldConfiguration; //导入依赖的package包/类
public Overworld() {
  assetManager = new AssetManager();

  camera = new HelixCamera(30, new Vector3(16, 16, 0), .1f, 35);

  WorldConfiguration worldConfiguration 
      = new WorldConfiguration().register(assetManager)
                                .register(camera);

  world = new World(worldConfiguration);

  world.setSystem(new PlayerMovementSystem());
  world.setSystem(new CameraClientsUpdateSystem());
  world.setSystem(new AnimationProcessingSystem());
  world.setSystem(new RenderingSystem());
  world.setSystem(new ScreenFadingSystem());

  world.setManager(new UuidEntityManager());
  world.setManager(new TextureManager());
  world.setManager(new GroupManager());
  world.setManager(new TagManager());
  world.setManager(new AreaManager());
  world.setManager(new PlayerManager());
  world.setManager(new LocalAmbienceManager());
  world.setManager(new WeatherMan());
  world.initialize();

  world.getManager(WeatherMan.class)
       .setToType(WeatherMan.WeatherType.SUNNY);
  world.getManager(AreaManager.class).load("area1");
  // Temporary
  world.getManager(LocalAmbienceManager.class)
       .setAmbience(world.getManager(WeatherMan.class).getWeather());
}
 
开发者ID:fauu,项目名称:HelixEngine,代码行数:35,代码来源:Overworld.java


示例11: Dispatch_OneListeningSystem_SystemReceivesEvent

import com.artemis.WorldConfiguration; //导入依赖的package包/类
@Test
public void Dispatch_OneListeningSystem_SystemReceivesEvent() {
    WorldConfiguration config = new WorldConfiguration();
    final EventSystem eventManager = new EventSystem();
    config.setSystem(eventManager);
    ReceiveSystem s1 = new ReceiveSystem();
    config.setSystem(s1);
    config.setSystem(new DispatchSystem());
    World w = new World(config);
    w.process();
    assertEquals(1, s1.count);
}
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:13,代码来源:InterSystemEventTest.java


示例12: Dispatch_NoListeningSystem_NoExceptions

import com.artemis.WorldConfiguration; //导入依赖的package包/类
@Test
public void Dispatch_NoListeningSystem_NoExceptions() {
    WorldConfiguration config = new WorldConfiguration();
    final EventSystem eventManager = new EventSystem();
    config.setSystem(eventManager);
    config.setSystem(new DispatchSystem());
    World w = new World(config);
    w.process();
    // no exception = success
}
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:11,代码来源:InterSystemEventTest.java


示例13: test_Dispatch_OneListeningSystem_SystemReceivesEvent

import com.artemis.WorldConfiguration; //导入依赖的package包/类
public void test_Dispatch_OneListeningSystem_SystemReceivesEvent() {
    WorldConfiguration config = new WorldConfiguration();
    final EventSystem eventManager = new EventSystem();
    config.setSystem(eventManager);
    ReceiveTestSystem s1 = new ReceiveTestSystem();
    config.setSystem(s1);
    config.setSystem(new DispatchTestSystem());

    World w = new World(config);
    w.process();
    assertEquals(1, s1.count);
}
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:13,代码来源:InterSystemEventGwtTest.java


示例14: test_Dispatch_NoListeningSystem_NoExceptions

import com.artemis.WorldConfiguration; //导入依赖的package包/类
public void test_Dispatch_NoListeningSystem_NoExceptions() {
    final WorldConfiguration config = new WorldConfiguration();
    final EventSystem eventManager = new EventSystem();
    config.setSystem(eventManager);
    config.setSystem(new DispatchTestSystem());
    World w = new World(config);
    w.process();
    // no exception = success
}
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:10,代码来源:InterSystemEventGwtTest.java


示例15: test_runartemis_processsimplesystem_noexceptions

import com.artemis.WorldConfiguration; //导入依赖的package包/类
public void test_runartemis_processsimplesystem_noexceptions() throws Exception {
    WorldConfiguration config = new WorldConfiguration();
    config.setSystem(new TagManager());

    CountingTestSystem s = new CountingTestSystem();
    config.setSystem(s);

    World w = new World(config);
    w.process();

    assertEquals(1, s.count);
}
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:13,代码来源:BasicArtemisGwtTest.java


示例16: setup

import com.artemis.WorldConfiguration; //导入依赖的package包/类
@Setup
public void setup()
{
	WorldConfiguration config = new WorldConfiguration();
	em = new EventSystem(instanceDispatcher(), new SubscribeAnnotationFinder());
	config.setSystem(em);
	activeEventHandlers = new ActiveEventHandlers();
	config.setSystem(activeEventHandlers);
	config.setSystem(new PaddingHandlers());

	World w = new World(config);
}
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:13,代码来源:DispatcherBenchmark.java


示例17: setup

import com.artemis.WorldConfiguration; //导入依赖的package包/类
@Setup
public void setup()
{
	final WorldConfiguration config = new WorldConfiguration();

	em = new EventSystem(instanceDispatcher(), new SubscribeAnnotationFinder());
	config.setSystem(em);
	activeEventHandlers = new ActiveEventHandlers();
	config.setSystem(activeEventHandlers);
	config.setSystem(new PaddingHandlers());

	World w = new World(config);
}
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:14,代码来源:ClassBasedDispatcherBenchmark.java


示例18: setUp

import com.artemis.WorldConfiguration; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    subscriptionManager = new DeltaSubscriptionManager();
    world = new World(new WorldConfiguration().setSystem(subscriptionManager));
    entity = new EntityBuilder(world).build();
    entity2 = new EntityBuilder(world).build();
}
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:8,代码来源:SubscriptionManagerTest.java


示例19: initializeDefaultServer

import com.artemis.WorldConfiguration; //导入依赖的package包/类
protected World initializeDefaultServer(MarshalDictionary marshalDictionary, boolean start) {

        final WorldConfiguration config = new WorldConfiguration();
        serverNetworkSystem = new MarshalSystem(marshalDictionary, new KryonetServerMarshalStrategy(TEST_HOST, TEST_PORT));
        config.setSystem(serverNetworkSystem);

        final World result = new World(config);
        if ( start ) serverNetworkSystem.start();
        return result;
    }
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:11,代码来源:NetworkIntegrationTest.java


示例20: initializeDefaultClient

import com.artemis.WorldConfiguration; //导入依赖的package包/类
protected World initializeDefaultClient(MarshalDictionary marshalDictionary, boolean start) {

        final WorldConfiguration config = new WorldConfiguration();
        clientNetworkSystem = new MarshalSystem(marshalDictionary, new KryonetClientMarshalStrategy(TEST_HOST, TEST_PORT));
        config.setSystem(clientNetworkSystem);

        World c = new World(config);
        if ( start ) clientNetworkSystem.start();

        return c;
    }
 
开发者ID:DaanVanYperen,项目名称:artemis-odb-contrib,代码行数:12,代码来源:NetworkIntegrationTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AddressingDispositionException类代码示例发布时间:2022-05-22
下一篇:
Java Action1类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap