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


Java TagManager类代码示例

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


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

示例1: createWorld

import com.artemis.managers.TagManager; //导入依赖的package包/类
protected World createWorld() {

		final RenderBatchingSystem renderBatchingSystem;

		return new World(new WorldConfigurationBuilder()
				.dependsOn(OperationsPlugin.class)
				.with(WorldConfigurationBuilder.Priority.HIGH,
						// supportive
						new SuperMapper(),
						new TagManager(),
						new CameraSystem(1),
						new FeatureScreenAssetSystem(),
						new OdbFeatureDetectionSystem()
				).with(WorldConfigurationBuilder.Priority.LOW,
						// processing
						new TransitionSystem(GdxArtemisGame.getInstance()),
						// animation
						new ClearScreenSystem(Color.valueOf("969291")),
						renderBatchingSystem = new RenderBatchingSystem(),
						new AnimRenderSystem(renderBatchingSystem),
						new FeatureScreenSetupSystem()
				).build());
	}
 
开发者ID:DaanVanYperen,项目名称:odb-artax,代码行数:24,代码来源:OdbFeatureScreen.java

示例2: createWorld

import com.artemis.managers.TagManager; //导入依赖的package包/类
protected World createWorld() {

		final RenderBatchingSystem renderBatchingSystem;

		return new World(new WorldConfigurationBuilder()
				.dependsOn(OperationsPlugin.class)
				.with(WorldConfigurationBuilder.Priority.HIGH,
						// supportive
						new TagManager(),
						new CameraSystem(1),
						new FeatureScreenAssetSystem(),
						new OdbFeatureDetectionSystem()
				).with(WorldConfigurationBuilder.Priority.LOW,
						// processing
						new TransitionSystem(GdxArtemisGame.getInstance()),
						// animation
						new ClearScreenSystem(Color.valueOf("969291")),
						renderBatchingSystem = new RenderBatchingSystem(),
						new AnimRenderSystem(renderBatchingSystem),
						new FeatureScreenSetupSystem()
				).build());
	}
 
开发者ID:DaanVanYperen,项目名称:odb-dynasty,代码行数:23,代码来源:OdbFeatureScreen.java

示例3: walkTo

import com.artemis.managers.TagManager; //导入依赖的package包/类
public void walkTo(Entity player, Position pos) {
    final Position playerP = pm.get(player);

    // move to conquered tile.
    playerP.x = pos.x;
    playerP.y = pos.y;

    Entity indicator = Tox.world.getManager(TagManager.class).getEntity(EntityFactory.INDICATOR_TAG);
    Position indicatorPos = pm.get(indicator);
    indicatorPos.x = playerP.x;
    indicatorPos.y = playerP.y;


    Toxication toxication = tm.get(player);
    if ( inventorySystem.hasEffect(EquipBonus.Effect.TEDDY) && toxication.toxication > 0.5f )
    {
        tickDrug();
    }
}
 
开发者ID:DaanVanYperen,项目名称:tox,代码行数:20,代码来源:PlayerSystem.java

示例4: createWorld

import com.artemis.managers.TagManager; //导入依赖的package包/类
protected World createWorld() {

		final RenderBatchingSystem renderBatchingSystem;

		return new World(new WorldConfigurationBuilder()
				.with(
						new TagManager()
				)
				.with(
						// supportive
						new CameraSystem(1),
						new FeatureScreenAssetSystem(),
						new OdbFeatureDetectionSystem()
				).with(
						// processing
						new SchedulerSystem(),
						new TransitionSystem(GdxArtemisGame.getInstance()),
						new ColorAnimationSystem()
				).with(
						// animation
						new ClearScreenSystem(Color.valueOf("969291")),
						renderBatchingSystem = new RenderBatchingSystem(),
						new AnimRenderSystem(renderBatchingSystem),
						new FeatureScreenSetupSystem()
				).build());
	}
 
开发者ID:DaanVanYperen,项目名称:odb-minion-factorium,代码行数:27,代码来源:OdbFeatureScreen.java

示例5: centerCameraOnArea

import com.artemis.managers.TagManager; //导入依赖的package包/类
public void centerCameraOnArea() {
  Entity area = world.getManager(TagManager.class).getEntity("area");

  IntVector2 dimensions = dimensionsMapper.get(area).get();

  Vector3 position = camera.position;

  float zDirection = camera.direction.z;

  float yTranslation
      = (float) (Math.sqrt((1 - (zDirection * zDirection))) / zDirection) *
                camera.position.z;

  camera.position.set(new Vector3(dimensions.x / 2,
                                  dimensions.y / 2 + yTranslation,
                                  position.z));
}
 
开发者ID:fauu,项目名称:HelixEngine,代码行数:18,代码来源:CameraIntermediary.java

示例6: createPlayer

import com.artemis.managers.TagManager; //导入依赖的package包/类
public static Entity createPlayer(int x, int y, int level) {
    Entity player = createTile(x, y, "player", Animation.Layer.TILE_COVER)
            .addComponent(new Level(1))
            .addComponent(new Inventory())
            .addComponent(new Toxication(1f))
            .addComponent(new Health(PlayerSystem.BONUS_PLAYER_HITPOINTS + level));
    Tox.world.getManager(TagManager.class).register(PLAYER_TAG, player);
    return player;
}
 
开发者ID:DaanVanYperen,项目名称:tox,代码行数:10,代码来源:EntityFactory.java

示例7: createBoss

import com.artemis.managers.TagManager; //导入依赖的package包/类
public static Entity createBoss(int x, int y, int level) {
    Entity boss = createMonster(x, y, level);
    boss.addComponent(new Named("The Jailer"));
    boss.addComponent(new Reward(Score.POINTS_KILL_JAILER));
    boss.getComponent(Animation.class).id = "boss";
    Color color = boss.getComponent(Animation.class).color;
    Tox.world.getManager(TagManager.class).register(BOSS_TAG, boss);
    return boss;
}
 
开发者ID:DaanVanYperen,项目名称:tox,代码行数:10,代码来源:EntityFactory.java

示例8: cloneLegacyPlayer

import com.artemis.managers.TagManager; //导入依赖的package包/类
/**
 * Quick hack to transfer player state to the next level.
 *
 * Kinda funky stuff here. Be weary!
 *
 * @param x
 * @param y
 * @param legacyPlayer
 * @return
 */
public static Entity cloneLegacyPlayer(int x, int y, Entity legacyPlayer) {

    Entity player = copyEntityFromOldWorld(legacyPlayer);

    player.getComponent(Toxication.class).toxication = 0.5f;
    player.getComponent(Health.class).damage = 0;

    Position position = player.getComponent(Position.class);
    position.x = x; position.y = y;

    // copy over the old inventory.
    Inventory oldInventory = legacyPlayer.getComponent(Inventory.class);


    Inventory inventory = player.getComponent(Inventory.class);
    {
        for ( int i =0; i<3;i++)
        {
            if ( oldInventory.carried[i] != null )
            {
                inventory.carried[i] = copyEntityFromOldWorld(oldInventory.carried[i]);
                inventory.carried[i].addToWorld();
            }
        }

    }

    Tox.world.getManager(TagManager.class).register(EntityFactory.PLAYER_TAG, player);

    return player;
}
 
开发者ID:DaanVanYperen,项目名称:tox,代码行数:42,代码来源:EntityUtils.java

示例9: fireBossBullet

import com.artemis.managers.TagManager; //导入依赖的package包/类
private void fireBossBullet() {
    Entity boss = world.getManager(TagManager.class).getEntity(EntityFactory.BOSS_TAG);
    if ( boss != null && pm.has(boss) )
    {
        soundSystem.playLater("tox_sfx_ak47_fight", 1.2f);
        Position position = pm.get(boss);
        Entity bullet = EntityFactory.createBullet((int) (position.x + Animation.DEFAULT_SCALE * ToxResource.TILE_SIZE * 0.5f),
                (int) (position.y + Animation.DEFAULT_SCALE * ToxResource.TILE_SIZE * 0.5f));
        lifetimeSystem.addToWorldLater(bullet, 1.2f);
    }
}
 
开发者ID:DaanVanYperen,项目名称:tox,代码行数:12,代码来源:PlayerSystem.java

示例10: checkBossVictory

import com.artemis.managers.TagManager; //导入依赖的package包/类
private void checkBossVictory(Entity monster) {
    Entity boss = world.getManager(TagManager.class).getEntity(EntityFactory.BOSS_TAG);
    if ( boss != null && monster == boss )
    {
        selectableSystem.selectionCooldown(3);
        Tox.gameScreen.isWinCooldown = 3;
    }
}
 
开发者ID:DaanVanYperen,项目名称:tox,代码行数:9,代码来源:CombatSystem.java

示例11: create

import com.artemis.managers.TagManager; //导入依赖的package包/类
@Override
public void create() {
  instance = this;
  
  uiEventBus = new EventBus();
  worldEventBus = new EventBus();

  overworld = new Overworld();
  setScreen(overworld);

  tagManager = overworld.getWorld().getManager(TagManager.class);
  areaManager = overworld.getWorld().getManager(AreaManager.class);

  tilePassageTargetPositionFieldState
      = new TilePassageTargetPositionFieldState();

  tilePermissionListState = new TilePermissionListState();
  tilePermissionListState.initialize(TilePermission.LEVEL0);

  toolbarState = new ToolbarState();
  toolbarState.initialize(ToolType.TILE_PERMISSIONS);

  ui = new UI();

  tilePassageAreaListState = new TilePassageAreaListState();
  Array<String> areaNames = areaManager.getAllNames();
  tilePassageAreaListState.initialize(areaNames, areaNames.first());

  Gdx.input.setInputProcessor(
      new InputMultiplexer(ui.getStage(), new EditorInputEventProcessor()));

  loadAreaAction("area1");
}
 
开发者ID:fauu,项目名称:HelixEngine,代码行数:34,代码来源:HelixEditor.java

示例12: Overworld

import com.artemis.managers.TagManager; //导入依赖的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

示例13: initialize

import com.artemis.managers.TagManager; //导入依赖的package包/类
@Override
protected void initialize() {
  HelixEditor.getInstance().getWorldEventBus().register(this);

  areaManager = world.getManager(AreaManager.class);
  tagManager = world.getManager(TagManager.class);

  assetManager.load(atlasPath, TextureAtlas.class);
  assetManager.finishLoading();
}
 
开发者ID:fauu,项目名称:HelixEngine,代码行数:11,代码来源:TilePermissionsEditingSystem.java

示例14: initialize

import com.artemis.managers.TagManager; //导入依赖的package包/类
@Override
protected void initialize() {
  Entity highlight = world.createEntity()
                          .edit()
                          .add(new PositionComponent())
                          .add(new DimensionsComponent(new IntVector2(1, 1)))
                          .add(new DisplayableComponent(
                              new TileHighlightDisplayable()))
                          .getEntity();
  world.getManager(TagManager.class).register("tileHighlight", highlight);
}
 
开发者ID:fauu,项目名称:HelixEngine,代码行数:12,代码来源:TileHighlightingSystem.java

示例15: Overworld

import com.artemis.managers.TagManager; //导入依赖的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


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