Ignore:
Timestamp:
2015-06-29 21:27:11 (7 years ago)
Author:
empaheik
Message:
 
File:
1 edited

Legend:

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

    r6539 r6544  
    1616        level.SetTileMethod("foreground", CreateForegroundTile); 
    1717        level.SetObjectMethod("exit", CreateExit); 
     18        level.SetTileMethod("decoration", CreateDecoration); 
     19        level.SetObjectMethod("player", CreatePlayer); 
    1820        level.Execute(); 
    1921 
     
    2224 
    2325    /// <summary> 
    24     /// Maassa oleva perus tiili. 
     26    /// Luo pelaajan. 
     27    /// </summary> 
     28    void CreatePlayer(Vector position, double width, double height, Angle angle, Shape shape, string name, Dictionary<string, string> properties) 
     29    { 
     30        player = new Creature(TILE_SIZE, TILE_SIZE); 
     31        player.MovementSpeed = 2300; 
     32        player.Position = position; 
     33        Add(player, 1); 
     34 
     35        AddCollisionHandler(player, "exit", CollidesWithExit); 
     36    } 
     37 
     38    /// <summary> 
     39    /// Maassa oleva tiili. 
    2540    /// </summary> 
    2641    void CreateBaseTile(Vector position, double width, double height, Image image, string layerName, Dictionary<string, string> properties) 
     
    3045 
    3146    /// <summary> 
    32     /// Pelaajan päällä näkyvä perus tiili. 
     47    /// Pohjan päällä, pelaajan alla näkyvä tiili. 
     48    /// </summary> 
     49    void CreateDecoration(Vector position, double width, double height, Image image, string layerName, Dictionary<string, string> properties) 
     50    { 
     51        CreateBasicTile(position, width, height, image, 0, properties); 
     52    } 
     53 
     54        /// <summary> 
     55    /// Pelaajan päällä näkyvä tiili. 
    3356    /// </summary> 
    3457    void CreateForegroundTile(Vector position, double width, double height, Image image, string layerName, Dictionary<string, string> properties) 
    3558    { 
    36         CreateBasicTile(position, width, height, image, 1, properties); 
     59        CreateBasicTile(position, width, height, image, 2, properties); 
    3760    } 
    3861 
Note: See TracChangeset for help on using the changeset viewer.