Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <things version="1">
- <entity name="Scene">
- <component type="com.pblabs.rendering2D.DisplayObjectScene" name="DisplayObjectScene">
- <position>
- <x>0</x>
- <y>225</y>
- </position>
- <!-- niet meer nodig <spacialDatabase componentReference="SceneDB" componentName="Box2dManager" /> -->
- <sceneView type="com.pblabs.rendering2D.ui.SceneView">
- <width>900</width>
- <height>500</height>
- <x>0</x>
- <y>0</y>
- </sceneView>
- </component>
- </entity>
- <entity name="Background">
- <component type="com.pblabs.rendering2D.SimpleSpatialComponent" name="Spatial">
- <position>
- <x>0</x>
- <y>0</y>
- </position>
- <size>
- <x>900</x>
- <y>500</y>
- </size>
- <spatialManager componentReference="SceneDB"/>
- </component>
- <component type="com.pblabs.rendering2D.SpriteRenderer" name="Render">
- <scene componentReference="Scene"/>
- <fileName>assets/bg.png</fileName>
- <zIndex>-1</zIndex>
- </component>
- </entity>
- <!-- moet geen box2d eigenschappen hebben dus in gewone scene -->
- <entity name="PlatformSpriteSheet">
- <component name="SpriteSheet" type="com.pblabs.rendering2D.spritesheet.SpriteSheetComponent" >
- <imageFilename>assets/platform.png</imageFilename>
- </component>
- </entity>
- <entity name="PlatformSpriteSheet2">
- <component name="SpriteSheet" type="com.pblabs.rendering2D.spritesheet.SpriteSheetComponent" >
- <imageFilename>assets/platform3.png</imageFilename>
- </component>
- </entity>
- <entity name="GoalSpriteSheet">
- <component name="SpriteSheet" type="com.pblabs.rendering2D.spritesheet.SpriteSheetComponent" >
- <imageFilename>assets/lvlgoal.png</imageFilename>
- </component>
- </entity>
- <template name="Platform">
- <component type="com.pblabs.box2D.Box2DSpatialComponent" name="SpatialPlatform">
- <spatialManager componentReference="SceneDB" />
- <collisionType>
- <type>Platform</type>
- </collisionType>
- <collidesWithTypes>
- <type>Player</type>
- <type>Enemy</type>
- </collidesWithTypes>
- <size>
- <x>256</x>
- <y>16</y>
- </size>
- <canMove>false</canMove>
- <canSleep>true</canSleep>
- <canRotate>false</canRotate>
- <collisionShapes>
- <shape type="com.pblabs.box2D.PolygonCollisionShape">
- <!-- Array van Points (vertices) -->
- <vertices childType="flash.geom.Point">
- <_><x>-1</x><y>-1</y></_>
- <_><x>1</x><y>-1</y></_>
- <_><x>1</x><y>1</y></_>
- <_><x>-1</x><y>1</y></_>
- </vertices>
- <friction>1</friction>
- </shape>
- </collisionShapes>
- </component>
- </template>
- <template name="Goal">
- <component type="com.pblabs.box2D.Box2DSpatialComponent" name="SpatialGoal">
- <spatialManager componentReference="SceneDB" />
- <collisionType>
- <type>Goal</type>
- </collisionType>
- <collidesWithTypes>
- <type>Player</type>
- </collidesWithTypes>
- <size>
- <x>38</x>
- <y>38</y>
- </size>
- <canMove>false</canMove>
- <canSleep>false</canSleep>
- <canRotate>false</canRotate>
- <collisionShapes childType="com.pblabs.box2D.CollisionShape">
- <Shape type="com.pblabs.box2D.CircleCollisionShape">
- <radius>0.6</radius>
- </Shape>
- </collisionShapes>
- </component>
- </template>
- <entity name="Platform1" template="Platform">
- <!-- kan alle eigenschappen overschrijven van template -->
- <component type="com.pblabs.rendering2D.SpriteSheetRenderer" name="Render">
- <scene componentReference="Scene" />
- <spriteSheet componentReference="PlatformSpriteSheet2" />
- <positionProperty>@SpatialPlatform.position</positionProperty>
- <rotationProperty>@SpatialPlatform.rotation</rotationProperty>
- <sizeProperty>@SpatialPlatform.size</sizeProperty>
- </component>
- <component name="SpatialPlatform">
- <size>
- <x>900</x>
- <y>50</y>
- </size>
- <position>
- <x>0</x>
- <y>225</y>
- </position>
- </component>
- </entity>
- <entity name="Platform2" template="Platform">
- <!-- kan alle eigenschappen overschrijven van template -->
- <component type="com.pblabs.rendering2D.SpriteSheetRenderer" name="Render">
- <scene componentReference="Scene" />
- <spriteSheet componentReference="PlatformSpriteSheet2" />
- <positionProperty>@SpatialPlatform.position</positionProperty>
- <rotationProperty>@SpatialPlatform.rotation</rotationProperty>
- <sizeProperty>@SpatialPlatform.size</sizeProperty>
- </component>
- <component name="SpatialPlatform">
- <size>
- <x>100</x>
- <y>20</y>
- </size>
- <position>
- <x>0</x>
- <y>0</y>
- </position>
- </component>
- </entity>
- <entity name="IdleRightSpriteSheet">
- <component name="SpriteSheet" type="com.pblabs.rendering2D.spritesheet.SpriteSheetComponent">
- <imageFilename>assets/idleright.png</imageFilename>
- <divider type="com.pblabs.rendering2D.spritesheet.CellCountDivider">
- <xCount>6</xCount>
- </divider>
- </component>
- </entity>
- <entity name="IdleLeftSpriteSheet">
- <component name="SpriteSheet" type="com.pblabs.rendering2D.spritesheet.SpriteSheetComponent">
- <imageFilename>assets/idleleft.png</imageFilename>
- <divider type="com.pblabs.rendering2D.spritesheet.CellCountDivider">
- <xCount>6</xCount>
- </divider>
- </component>
- </entity>
- <entity name="RunLeftSpriteSheet">
- <component name="SpriteSheet" type="com.pblabs.rendering2D.spritesheet.SpriteSheetComponent">
- <imageFilename>assets/runleft.png</imageFilename>
- <divider type="com.pblabs.rendering2D.spritesheet.CellCountDivider">
- <xCount>12</xCount>
- </divider>
- </component>
- </entity>
- <entity name="RunRightSpriteSheet">
- <component name="SpriteSheet" type="com.pblabs.rendering2D.spritesheet.SpriteSheetComponent">
- <imageFilename>assets/runright.png</imageFilename>
- <divider type="com.pblabs.rendering2D.spritesheet.CellCountDivider">
- <xCount>12</xCount>
- </divider>
- </component>
- </entity>
- <entity name="EnemySpriteSheet">
- <component type="com.pblabs.rendering2D.spritesheet.SpriteSheetComponent" name="SpriteSheet">
- <image filename="assets/monster.png"/>
- <divider type="com.pblabs.rendering2D.spritesheet.CellCountDivider">
- <xCount>2</xCount>
- <yCount>1</yCount>
- </divider>
- </component>
- </entity>
- <entity name="Player">
- <component type="com.pblabs.rendering2D.SpriteSheetRenderer" name="RenderPlayer">
- <scene componentReference="Scene" />
- <positionProperty>@SpatialPlayer.position</positionProperty>
- <rotationProperty>@SpatialPlayer.rotation</rotationProperty>
- <sizeProperty>@SpatialPlayer.size</sizeProperty>
- </component>
- <component type="com.pblabs.box2D.Box2DSpatialComponent" name="SpatialPlayer">
- <spatialManager componentReference="SceneDB" />
- <collisionType>
- <type>Player</type>
- </collisionType>
- <collidesWithTypes>
- <type>Platform</type>
- <type>Enemy</type>
- <type>Goal</type>
- </collidesWithTypes>
- <size>
- <x>43</x>
- <y>48</y>
- </size>
- <position>
- <x>-400</x>
- <y>200</y>
- </position>
- <canSleep>false</canSleep>
- <canRotate>false</canRotate>
- <collisionShapes>
- <shape type="com.pblabs.box2D.PolygonCollisionShape">
- <!-- Array van Points (vertices) -->
- <vertices childType="flash.geom.Point">
- <_><x>-0.65</x><y>-0.9</y></_>
- <_><x>0.65</x><y>-0.9</y></_>
- <_><x>0.65</x><y>0.9</y></_>
- <_><x>-0.65</x><y>0.9</y></_>
- </vertices>
- <friction>1</friction>
- </shape>
- </collisionShapes>
- </component>
- <!-- zorgt voor animatie -->
- <component type="com.pblabs.rendering2D.AnimationController" name="Animation">
- <spriteSheetReference>@RenderPlayer.spriteSheet</spriteSheetReference>
- <currentFrameReference>@RenderPlayer.spriteIndex</currentFrameReference>
- <defaultAnimation>IdleRight</defaultAnimation>
- <changeAnimationEvent>PlayerAnimation</changeAnimationEvent>
- <currentAnimationReference>@KeyboardController.currentAnimation</currentAnimationReference>
- <animations childType="com.pblabs.rendering2D.AnimationControllerInfo">
- <IdleRight>
- <frameRate>12</frameRate>
- <loop>true</loop>
- <spriteSheet componentReference="IdleRightSpriteSheet" />
- </IdleRight>
- <IdleLeft>
- <frameRate>12</frameRate>
- <loop>true</loop>
- <spriteSheet componentReference="IdleLeftSpriteSheet" />
- </IdleLeft>
- <RunRight>
- <frameRate>6</frameRate>
- <loop>true</loop>
- <spriteSheet componentReference="RunRightSpriteSheet" />
- </RunRight>
- <RunLeft>
- <frameRate>6</frameRate>
- <loop>true</loop>
- <spriteSheet componentReference="RunLeftSpriteSheet" />
- </RunLeft>
- </animations>
- </component>
- <!-- zelf geschreven component -->
- <component type="KeyboardControllerWithInputmapComponent" name="KeyboardController">
- <velocityProperty>@SpatialPlayer.linearVelocity</velocityProperty>
- <animationEventName>PlayerAnimation</animationEventName>
- <movingSpeed>200</movingSpeed>
- <jumpSpeed>200</jumpSpeed>
- <Input>
- <goLeft>LEFT</goLeft>
- <goRight>RIGHT</goRight>
- <goUp>UP</goUp>
- <goDown>DOWN</goDown>
- <pause>O</pause>
- <cocaine>X</cocaine>
- <weed>C</weed>
- <xtc>V</xtc>
- </Input>
- <jumpSound>assets/jump.mp3</jumpSound>
- <positionProperty>@SpatialPlayer.position</positionProperty>
- </component>
- </entity>
- <entity name="Enemy">
- <component type="com.pblabs.box2D.Box2DSpatialComponent" name="SpatialEnemy">
- <spatialManager componentReference="SceneDB"/>
- <canRotate>false</canRotate>
- <canSleep>false</canSleep>
- <canMove>false</canMove>
- <collisionType childType="String">
- <Type>Enemy</Type>
- </collisionType>
- <collidesWithTypes childType="String">
- <Type>Platform</Type>
- <Type>Player</Type>
- </collidesWithTypes>
- <size>
- <x>26</x>
- <y>27</y>
- </size>
- <position>
- <x>0</x>
- <y>180</y>
- </position>
- <collisionShapes childType="com.pblabs.box2D.CollisionShape">
- <Shape type="com.pblabs.box2D.CircleCollisionShape">
- <radius>0.6</radius>
- </Shape>
- </collisionShapes>
- </component>
- <component type="com.pblabs.rendering2D.SpriteSheetRenderer" name="RenderEnemy">
- <scene componentReference="Scene"/>
- <positionProperty>@SpatialEnemy.position</positionProperty>
- <rotationProperty>@SpatialEnemy.rotation</rotationProperty>
- <sizeProperty>@SpatialEnemy.size</sizeProperty>
- </component>
- <component type="com.pblabs.rendering2D.AnimationController" name="Animation">
- <spriteSheetReference>@RenderEnemy.spriteSheet</spriteSheetReference>
- <currentFrameReference>@RenderEnemy.spriteIndex</currentFrameReference>
- <defaultAnimation>Idle</defaultAnimation>
- <animations childType="com.pblabs.rendering2D.AnimationControllerInfo">
- <Idle type="">
- <frameRate>2</frameRate>
- <loop>true</loop>
- <spriteSheet componentReference="EnemySpriteSheet"/>
- </Idle>
- </animations>
- </component>
- </entity>
- <entity name="Goal1" template="Goal">
- <!-- kan alle eigenschappen overschrijven van template -->
- <component type="com.pblabs.rendering2D.SpriteSheetRenderer" name="Render">
- <scene componentReference="Scene" />
- <spriteSheet componentReference="GoalSpriteSheet" />
- <positionProperty>@SpatialGoal.position</positionProperty>
- <rotationProperty>@SpatialGoal.rotation</rotationProperty>
- <sizeProperty>@SpatialGoal.size</sizeProperty>
- </component>
- <component name="SpatialGoal">
- <size>
- <x>38</x>
- <y>38</y>
- </size>
- <position>
- <x>0</x>
- <y>80</y>
- </position>
- </component>
- </entity>
- <group name="SpriteSheets">
- <objectReference name="PlatformSpriteSheet" />
- <objectReference name="PlatformSpriteSheet2" />
- <objectReference name="GoalSpriteSheet" />
- <objectReference name="IdleRightSpriteSheet" />
- <objectReference name="RunLeftSpriteSheet" />
- <objectReference name="RunRightSpriteSheet" />
- <objectReference name="IdleLeftSpriteSheet" />
- <objectReference name="EnemySpriteSheet"/>
- </group>
- <group name="Objects">
- <objectReference name="Background"/>
- <objectReference name="Player" />
- <!-- <objectReference name="Goal1"/> -->
- <objectReference name="Enemy"/>
- <objectReference name="Platform1" />
- <objectReference name="Platform2" />
- </group>
- <group name="Managers">
- <objectReference name="Scene" />
- </group>
- <group name="Level1Data">
- <groupReference name="Managers" />
- <groupReference name="SpriteSheets" />
- <groupReference name="Objects" />
- </group>
- </things>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement