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


Java ComponentType类代码示例

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


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

示例1: sameComponentType

import com.badlogic.ashley.core.ComponentType; //导入依赖的package包/类
@Test
public void sameComponentType () {
	ComponentType componentType1 = ComponentType.getFor(ComponentA.class);
	ComponentType componentType2 = ComponentType.getFor(ComponentA.class);

	assertEquals(true, componentType1.equals(componentType2));
	assertEquals(true, componentType2.equals(componentType1));
	assertEquals(componentType1.getIndex(), componentType2.getIndex());
	assertEquals(componentType1.getIndex(), ComponentType.getIndexFor(ComponentA.class));
	assertEquals(componentType2.getIndex(), ComponentType.getIndexFor(ComponentA.class));
}
 
开发者ID:DevelopersGuild,项目名称:Planetbase,代码行数:12,代码来源:ComponentTypeTests.java

示例2: differentComponentType

import com.badlogic.ashley.core.ComponentType; //导入依赖的package包/类
@Test
public void differentComponentType () {
	ComponentType componentType1 = ComponentType.getFor(ComponentA.class);
	ComponentType componentType2 = ComponentType.getFor(ComponentB.class);

	assertEquals(false, componentType1.equals(componentType2));
	assertEquals(false, componentType2.equals(componentType1));
	assertNotEquals(componentType1.getIndex(), componentType2.getIndex());
	assertNotEquals(componentType1.getIndex(), ComponentType.getIndexFor(ComponentB.class));
	assertNotEquals(componentType2.getIndex(), ComponentType.getIndexFor(ComponentA.class));
}
 
开发者ID:DevelopersGuild,项目名称:Planetbase,代码行数:12,代码来源:ComponentTypeTests.java

示例3: validComponentType

import com.badlogic.ashley.core.ComponentType; //导入依赖的package包/类
@Test
public void validComponentType () {
	assertNotNull(ComponentType.getFor(ComponentA.class));
	assertNotNull(ComponentType.getFor(ComponentB.class));
}
 
开发者ID:DevelopersGuild,项目名称:Planetbase,代码行数:6,代码来源:ComponentTypeTests.java

示例4: updateEntities

import com.badlogic.ashley.core.ComponentType; //导入依赖的package包/类
public void updateEntities(Engine engine) {
	entities = engine.getEntitiesFor(Family.getFor(ComponentType.getBitsFor(),
			ComponentType.getBitsFor(CPhysics.class, CParticle.class), ComponentType.getBitsFor()));
}
 
开发者ID:Saltosion,项目名称:GladiatorBrawler,代码行数:5,代码来源:RenderingSystem.java


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