- <things version="1">
- <template name="Enemy">
- <component type="com.pblabs.box2D.Box2DSpatialComponent" name="Spatial">
- <canMove>false</canMove>
- <canRotate>false</canRotate>
- <collidesWithTypes childType="String">
- <_0>Player</_0>
- </collidesWithTypes>
- <collisionShapes childType="com.pblabs.box2D.CollisionShape">
- <_0 type="com.pblabs.box2D.PolygonCollisionShape">
- <vertices childType="flash.geom.Point">
- <_0 type="">
- <x>-1</x>
- <y>-1</y>
- </_0>
- <_1 type="">
- <x>1</x>
- <y>-1</y>
- </_1>
- <_2 type="">
- <x>1</x>
- <y>1</y>
- </_2>
- <_3 type="">
- <x>-1</x>
- <y>1</y>
- </_3>
- </vertices>
- </_0>
- </collisionShapes>
- <collisionType childType="String">
- <_0>Enemy</_0>
- <_1>Renderable</_1>
- </collisionType>
- <manager componentReference="SpatialDB"/>
- <size type="">
- <x>26</x>
- <y>26</y>
- </size>
- </component>
- <component type="com.pblabs.rendering2D.SpriteRenderComponent" name="Render">
- <positionReference>@Spatial.position</positionReference>
- <rotationReference>@Spatial.rotation</rotationReference>
- <sizeReference>@Spatial.size</sizeReference>
- <spriteSheet type="com.pblabs.rendering2D.SpriteSheetComponent" name="SpriteSheet">
- <image filename="../Media/enemy.png"/>
- </spriteSheet>
- </component>
-
- <component type="com.pblabs.rendering2D.AnimationController" name="Animation">
- <spriteSheetReference>@Render.spriteSheet</spriteSheetReference>
- <currentFrameReference>@Render.spriteIndex</currentFrameReference>
- <defaultAnimation>Idle</defaultAnimation>
- <animations childType="com.pblabs.rendering2D.AnimationControllerInfo">
- <Idle type="">
- <frameRate>4</frameRate>
- <maxFrameDelay>250</maxFrameDelay>
- <loop>true</loop>
- <spriteSheet componentReference="EnemySpriteSheet"/>
- </Idle>
- </animations>
- </component>
-
- </template>
- </things>