Skip to content

Commit

Permalink
Map
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFlyingFiddle committed May 22, 2012
1 parent 9ed3858 commit 148e6ec
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 36 deletions.
Binary file modified Fallout-Equestria-The-Game/bin/behavior/PortalBehavior.class
Binary file not shown.
Binary file modified Fallout-Equestria-The-Game/bin/screenCore/Level1.class
Binary file not shown.
46 changes: 46 additions & 0 deletions Fallout-Equestria-The-Game/resources/archetypes/Pill.archetype
@@ -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>
122 changes: 88 additions & 34 deletions Fallout-Equestria-The-Game/resources/scenes/Level1V2.xml

Large diffs are not rendered by default.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -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,
Expand Down
12 changes: 10 additions & 2 deletions Fallout-Equestria-The-Game/src/screenCore/Level1.java
Expand Up @@ -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());

}
}
}
Expand All @@ -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")) {
Expand All @@ -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);
}
Expand Down

0 comments on commit 148e6ec

Please sign in to comment.