Ignore:
Timestamp:
2015-07-01 17:56:40 (7 years ago)
Author:
sieerinn
Message:

Junahuone lisätty.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/LevelCreation.cs

    r6701 r6702  
    124124    void CreateExit(Vector position, double width, double height, Angle angle, Shape shape, string name, Dictionary<string, string> properties) 
    125125    { 
    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. 
    127127        var exit = new Exit(width, height); 
    128128        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        } 
    131134        exit.Name = name; 
    132135        Add(exit); 
Note: See TracChangeset for help on using the changeset viewer.