minion java上传文件_Java BaseSystem类代码示例

import com.artemis.BaseSystem; //导入依赖的package包/类

@Override

public void enter(NhgEntry nhgEntry) {

NhgLogger.log(this, "Engine is not initialized.");

// Setup the ECS world.

WorldConfigurationBuilder configurationBuilder = new WorldConfigurationBuilder();

// Configure user entity systems

Array entitySystems = nhgEntry.onConfigureEntitySystems();

// Configure the most important systems last, especially RenderingSystem which

// should be the last because it renders all the changes happened in all other

// systems.

if (!hasSystemClass(InputSystem.class, entitySystems)) {

entitySystems.add(new InputSystem(nhgEntry.nhg.assets));

} else {

NhgLogger.log(this, "InputSystem already registered, ignoring registration.");

}

if (!hasSystemClass(PhysicsSystem.class, entitySystems)) {

entitySystems.add(new PhysicsSystem());

} else {

NhgLogger.log(this, "PhysicsSystem already registered, ignoring registration.");

}

if (!hasSystemClass(CameraSystem.class, entitySystems)) {

entitySystems.add(new CameraSystem());

} else {

NhgLogger.log(this, "CameraSystem already registered, ignoring registration.");

}

if (!hasSystemClass(LightingSystem.class, entitySystems)) {

entitySystems.add(new LightingSystem());

} else {

NhgLogger.log(this, "LightingSystem already registered, ignoring registration.");

}

if (!hasSystemClass(ParticleRenderingSystem.class, entitySystems)) {

entitySystems.add(new ParticleRenderingSystem(nhgEntry.nhg.entities));

} else {

NhgLogger.log(this, "ParticleRenderingSystem already registered, ignoring registration.");

}

if (!hasSystemClass(ModelRenderingSystem.class, entitySystems)) {

entitySystems.add(new ModelRenderingSystem(nhgEntry.nhg.entities, nhgEntry.nhg.messaging));

} else {

NhgLogger.log(this, "ModelRenderingSystem already registered, ignoring registration.");

}

if (!hasSystemClass(UiSystem.class, entitySystems)) {

entitySystems.add(new UiSystem(nhgEntry.nhg.entities));

} else {

NhgLogger.log(this, "ModelRenderingSystem already registered, ignoring registration.");

}

if (!hasSystemClass(DebugRenderingSystem.class, entitySystems)) {

entitySystems.add(new DebugRenderingSystem(nhgEntry.nhg.entities));

} else {

NhgLogger.log(this, "DebugRenderingSystem already registered, ignoring registration.");

}

if (!hasSystemClass(RenderingSystem.class, entitySystems)) {

entitySystems.add(new RenderingSystem());

} else {

NhgLogger.log(this, "RenderingSystem already registered, ignoring registration.");

}

for (BaseSystem bes : entitySystems) {

configurationBuilder.with(bes);

}

nhgEntry.nhg.entities.setEntityWorld(new World(configurationBuilder.build()));

nhgEntry.getFsm().changeState(EngineStates.INITIALIZED);

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值