Permalink
Browse files

Map

  • Loading branch information...
1 parent 9ed3858 commit 148e6ec331bcda8feb9b620b30d94c580baa05f5 @TheFlyingFiddle TheFlyingFiddle committed May 22, 2012
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,46 @@
+<entityFramework.EntityArchetype>
+ <components class="com.google.common.collect.RegularImmutableSet" resolves-to="com.google.common.collect.ImmutableSet$SerializedForm">
+ <elements>
+ <Animation>
+ <animationPlayer>
+ <Asset>pill.animset</Asset>
+ </animationPlayer>
+ <tint>
+ <Color>1.0,1.0,1.0,1.0</Color>
+ </tint>
+ </Animation>
+ <Behaviour>
+ <behavior class="behavior.PillBehavior">
+ <initialized>false</initialized>
+ <enabled>false</enabled>
+ <cactuarAnimSetName>"cactuar.animset"</cactuarAnimSetName>
+ </behavior>
+ </Behaviour>
+ <Physics>
+ <immovable>false</immovable>
+ <velocity>0.0,0.0</velocity>
+ <mass>0.5</mass>
+ <torque>0.0</torque>
+ </Physics>
+ <Transformation>
+ <position reference="../../Physics/velocity"/>
+ <scale>1.0,1.0</scale>
+ <origin>50.0,50.0</origin>
+ <rotation>0.0</rotation>
+ <mirror>false</mirror>
+ </Transformation>
+ <Spatial>
+ <bounds>
+ <Max>20,10,20</Max>
+ <Min>-20,-10,-20</Min>
+ </bounds>
+ <trigger>false</trigger>
+ <collideable>true</collideable>
+ </Spatial>
+ </elements>
+ </components>
+ <groups class="com.google.common.collect.EmptyImmutableSet" resolves-to="com.google.common.collect.ImmutableSet$SerializedForm">
+ <elements/>
+ </groups>
+ <label></label>
+</entityFramework.EntityArchetype>

Large diffs are not rendered by default.

Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -43,6 +43,7 @@ public void onTriggerEnter(IEntity entity) {
SpatialComp linkedSpatial = linkedPortal.getComponent(SpatialComp.class);
TransformationComp sendTrans = entity.getComponent(TransformationComp.class);
+ sendTrans.setHeight(linkedTransformation.getHeight());
SpatialComp sendSpatial = entity.getComponent(SpatialComp.class);
Vector2 sendPos = new Vector2(linkedTransformation.getPosition().X,
@@ -65,9 +65,13 @@ private void SpawnArchetypes(List<SceneNode> nodes) {
SceneNode node = nodes.get(i);
if(node.getNodeID().contains("Spawn") && !node.getNodeID().contains("Player")) {
String[] data = StringHelper.split(node.getNodeID(), '_');
- String archetypeName = data[1];
+ String archetypeName = data[1] + ".archetype";
IEntityArchetype archetype = this.ScreenManager.getContentManager().loadArchetype(archetypeName);
- this.World.getEntityManager().createEntity(archetype);
+ IEntity entity = this.World.getEntityManager().createEntity(archetype);
+ System.out.println("Created node of type " + archetypeName);
+ entity.getComponent(TransformationComp.class).setPosition(node.getPosition());
+ System.out.println(node.getPosition());
+
}
}
}
@@ -78,6 +82,7 @@ private void SpawnPortals(List<SceneNode> nodes) {
SceneNode node = nodes.get(i);
if(node.getNodeID().contains("Portal")) {
IEntity portal = this.World.getEntityManager().createEntity(archetype);
+ System.out.println("Created portal!");
String otherPortalID;
if(node.getNodeID().contains("X")) {
@@ -86,8 +91,11 @@ private void SpawnPortals(List<SceneNode> nodes) {
otherPortalID = "PortalX" + node.getNodeID().charAt(node.getNodeID().length() - 1);
}
+ System.out.println(otherPortalID);
PortalBehavior behavior = new PortalBehavior(node.getNodeID(), otherPortalID);
portal.addComponent(new BehaviourComp(behavior));
+ portal.getComponent(TransformationComp.class).setPosition(node.getPosition());
+
portal.refresh();
nodes.remove(i);
}

0 comments on commit 148e6ec

Please sign in to comment.