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


Java Engine.addEntityListener方法代码示例

本文整理汇总了Java中com.badlogic.ashley.core.Engine.addEntityListener方法的典型用法代码示例。如果您正苦于以下问题:Java Engine.addEntityListener方法的具体用法?Java Engine.addEntityListener怎么用?Java Engine.addEntityListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.badlogic.ashley.core.Engine的用法示例。


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

示例1: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
public void addedToEngine(Engine engine) {
    super.addedToEngine(engine);
    syncedEntities = engine.getEntitiesFor(Family.all(PlayerClass.class).get());
    engine.addEntityListener(Family.all(NetworkAddComponent.class).get(), this);
    player = engine.getEntitiesFor(Family.all(NetworkSyncComponent.class, PlayerClass.class, IdComponent.class).get());

}
 
开发者ID:ezet,项目名称:penguins-in-space,代码行数:9,代码来源:NetworkSystem.java

示例2: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
public void addedToEngine (Engine engine) {
	ImmutableArray<Entity> newEntities = engine.getEntitiesFor(family);
	sortedEntities.clear();
	if (newEntities.size() > 0) {
		for (int i = 0; i < newEntities.size(); ++i) {
			sortedEntities.add(newEntities.get(i));
		}
		sortedEntities.sort(comparator);
	}
	shouldSort = false;
	engine.addEntityListener(family, this);
}
 
开发者ID:DevelopersGuild,项目名称:Planetbase,代码行数:14,代码来源:SortedIteratingSystem.java

示例3: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
public void addedToEngine (Engine engine)
{
	super.addedToEngine(engine);
	engine.addEntityListener(family, Integer.MAX_VALUE, this);
	doors = engine.getEntitiesFor(family);
	doorsToOpen = new Array<Entity>();
	doorsToClose = new Array<Entity>();
}
 
开发者ID:saltares,项目名称:libgdxjam,代码行数:9,代码来源:DoorSystem.java

示例4: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
public void addedToEngine(Engine engine) {
	super.addedToEngine(engine);
	observables = engine.getEntitiesFor(
		Family.all(ObservableComponent.class).get()
	);
	engine.addEntityListener(getFamily(), this);
}
 
开发者ID:saltares,项目名称:libgdxjam,代码行数:9,代码来源:VisionSystem.java

示例5: Systems

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
public Systems(Engine engine){

		engine.addSystem(physics);
		engine.addSystem(agent);
		engine.addSystem(camera);
		engine.addSystem(move);
		engine.addSystem(player);
		engine.addSystem(weapon);
		engine.addSystem(lifetime);
		engine.addSystem(vision);
		//engine.addSystem(rangedGroundAI);
		//engine.addSystem(civilianGroundAI);
		engine.addSystem(spriteRender);
		engine.addSystem(team);
		engine.addSystem(collectable);
		engine.addSystem(spawn);
		engine.addSystem(damage);
		engine.addSystem(particle);
		//engine.addSystem(helicopterAI);
		engine.addSystem(vehicle);
		
		engine.addEntityListener(camera);
		engine.addEntityListener(physics);
		engine.addEntityListener(player);
		engine.addEntityListener(spriteRender);

	}
 
开发者ID:Deftwun,项目名称:ZombieCopter,代码行数:28,代码来源:Systems.java

示例6: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
// Overriden so this object can register itself to listen to entity removal
// notifications - so it can actually kill animations for entities that are
// gone
public void addedToEngine(Engine engine) {
	super.addedToEngine(engine);
	engine.addEntityListener(this);
}
 
开发者ID:e-ucm,项目名称:ead,代码行数:9,代码来源:TweenSystem.java

示例7: EntityManager

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
public EntityManager(Engine ashleyEngine, SpriteBatch batch, OrthographicCamera gameCamera,
		InputHandler inputhandler, UiStage _uiStage, GameStateManager gsm,EntityFactory entityFactory) {
	this._ashleyEngine = ashleyEngine;
	this.inputhandler = inputhandler;

	setEntityFactory(entityFactory);
	
	EntityModel _entityModel = new EntityModel(_waveManager, getEntityFactory(), gameCamera, ashleyEngine);
	uiController = new UIStageController(_uiStage , _entityModel, gsm);
	getEntityFactory().createPlayerEntity();
	_waveManager = new WaveTimeManager(getEntityFactory() , uiController);
	MoveToSystem moveToSystem = new MoveToSystem(gameCamera);
	coinSystem = new CoinSystem(gameCamera);
	PlayerStatSystem statSystem = new PlayerStatSystem(uiController, _entityModel);
	TowerPlacementSystem towerSystem = new TowerPlacementSystem(batch);
	ShootingSystem shootingSystem = new ShootingSystem(entityFactory);
	ProjectileMovementSystem projectileMovementSystem = new ProjectileMovementSystem();
	AimingSystem aimingSystem = new AimingSystem();
	RenderSystem renderSystem = new RenderSystem(batch);
	HealthSystem healthSystem = new HealthSystem(batch, getEntityFactory());
	PlayerInputSystem playerInputSys = new PlayerInputSystem();
	inputhandler.registerInputHandlerSystem(playerInputSys);
	CameraMovementSystem camSys = new CameraMovementSystem(gameCamera);
	TowerSelectionSystem towerSelectSystem = new TowerSelectionSystem(getEntityFactory(), gameCamera);
	SpriteRenderSystem spriteRenderSystem = new SpriteRenderSystem(batch);
	SplashDamageSystem splashDamageSystem = new SplashDamageSystem();
	
	ashleyEngine.addSystem(statSystem);
	ashleyEngine.addSystem(towerSelectSystem);
	ashleyEngine.addSystem(moveToSystem);
	ashleyEngine.addSystem(towerSystem);
	ashleyEngine.addSystem(spriteRenderSystem);
	ashleyEngine.addSystem(renderSystem);
	ashleyEngine.addSystem(healthSystem);
	ashleyEngine.addSystem(playerInputSys);
	ashleyEngine.addSystem(camSys);
	ashleyEngine.addSystem(coinSystem);
	ashleyEngine.addSystem(splashDamageSystem);
	ashleyEngine.addSystem(shootingSystem);
	ashleyEngine.addSystem(projectileMovementSystem);
	ashleyEngine.addSystem(aimingSystem);
	
	ashleyEngine.addEntityListener(Families.PROJECTILE,splashDamageSystem);
	ashleyEngine.addEntityListener(Families.ENEMY, projectileMovementSystem);
}
 
开发者ID:JoakimRW,项目名称:ExamensArbeteTD,代码行数:46,代码来源:EntityManager.java

示例8: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
public void addedToEngine(Engine engine) {
    engine.addEntityListener(Family.all(BuildingComponent.class).get(), this);
}
 
开发者ID:SergeySave,项目名称:SpaceGame,代码行数:5,代码来源:PlanetSystem.java

示例9: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
public void addedToEngine(Engine engine) {
	super.addedToEngine(engine);
	engine.addEntityListener(CAM_FAMILY, mainCamSetter);
	fs = engine.getSystem(FlockingSystem.class);
}
 
开发者ID:urstruktur,项目名称:zierfisch,代码行数:7,代码来源:CameraSystem.java

示例10: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
public void addedToEngine(Engine engine)
{
	super.addedToEngine(engine);
	engine.addEntityListener(getFamily(), this);
}
 
开发者ID:saltares,项目名称:libgdxjam,代码行数:7,代码来源:StateSystem.java

示例11: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
public void addedToEngine(Engine engine) {
	super.addedToEngine(engine);
	engine.addEntityListener(family, Integer.MAX_VALUE, this);
	entities = engine.getEntitiesFor(family);
}
 
开发者ID:saltares,项目名称:libgdxjam,代码行数:7,代码来源:PhysicsSystem.java

示例12: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
public void addedToEngine(Engine engine) {
	super.addedToEngine(engine);
	engine.addEntityListener(getFamily(), this);
}
 
开发者ID:saltares,项目名称:libgdxjam,代码行数:6,代码来源:AnimationControlSystem.java

示例13: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
public void addedToEngine(Engine engine) {
	super.addedToEngine(engine);
	engine.addEntityListener(family, Integer.MAX_VALUE, this);
}
 
开发者ID:saltares,项目名称:libgdxjam,代码行数:6,代码来源:LightSystem.java

示例14: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
public void addedToEngine(Engine engine) {
	super.addedToEngine(engine);
	engine.addEntityListener(getFamily(), 0, this);
}
 
开发者ID:saltares,项目名称:libgdxjam,代码行数:6,代码来源:PlayerSystem.java

示例15: addedToEngine

import com.badlogic.ashley.core.Engine; //导入方法依赖的package包/类
@Override
public void addedToEngine(Engine engine) {
    Family family = Family.all(PositionComponent.class, AnimationComponent.class).get();
    engine.addEntityListener(family, this);
}
 
开发者ID:GameDevWeek,项目名称:CodeBase,代码行数:6,代码来源:AnimationRenderSystem.java


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