- Timestamp:
- 2015-07-01 17:56:40 (8 years ago)
- Location:
- 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/LevelCreation.cs
r6701 r6702 124 124 void CreateExit(Vector position, double width, double height, Angle angle, Shape shape, string name, Dictionary<string, string> properties) 125 125 { 126 var target = properties["goto"] .Split('@'); // Jos peli kaatuu tälle riville niin joltain exitiltä puuttuu goto-property.126 var target = properties["goto"] == "disabled"? null : properties["goto"].Split('@'); // Jos peli kaatuu tälle riville niin joltain exitiltä puuttuu goto-property. 127 127 var exit = new Exit(width, height); 128 128 exit.Position = position; 129 exit.TargetLevel = target[0]; 130 exit.TargetExitName = target[1]; 129 if (target != null) 130 { 131 exit.TargetLevel = target[0]; 132 exit.TargetExitName = target[1]; 133 } 131 134 exit.Name = name; 132 135 Add(exit); -
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel.cs
r6701 r6702 415 415 { 416 416 var oldExit = pExit as Exit; 417 if (oldExit == null || transition )417 if (oldExit == null || transition || oldExit.TargetLevel == null) 418 418 return; 419 419 -
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabrielContent/TheLegendOfGabrielContent.contentproj
r6701 r6702 285 285 </Compile> 286 286 </ItemGroup> 287 <ItemGroup> 288 <Compile Include="bossroom.tmx"> 289 <Name>bossroom</Name> 290 <Importer>TextFileImporter</Importer> 291 <Processor>TextFileContentProcessor</Processor> 292 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 293 </Compile> 294 </ItemGroup> 287 295 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 288 296 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabrielContent/level1.tmx
r6699 r6702 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <map version="1.0" orientation="orthogonal" renderorder="right-down" width="25" height="40" tilewidth="20" tileheight="20" nextobjectid="4 1">2 <map version="1.0" orientation="orthogonal" renderorder="right-down" width="25" height="40" tilewidth="20" tileheight="20" nextobjectid="42"> 3 3 <tileset firstgid="1" source="LegendOfGabrielTileset.tsx"/> 4 4 <layer name="base" width="25" height="40"> … … 36 36 </properties> 37 37 </object> 38 <object id="41" name="debug" x="280" y="780" width="20" height="20"> 39 <properties> 40 <property name="goto" value="bossroom@enterance"/> 41 </properties> 42 </object> 38 43 </objectgroup> 39 44 <objectgroup name="player">
Note: See TracChangeset
for help on using the changeset viewer.