Skip to content

Commit

Permalink
Updated samples with Multi-worlds support (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Jan 15, 2024
1 parent 90f2abf commit 0541130
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion samples/Flixel - Render tile layer/src/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PlayState extends FlxState


// Iterate all world levels
for( level in project.all_worlds.Default.levels ) {
for( level in project.all_worlds.SampleWorld.levels ) {
// Create a FlxGroup for all level layers
var container = new flixel.group.FlxSpriteGroup();
add(container);
Expand Down
2 changes: 1 addition & 1 deletion samples/Generic - Read project/ReadProject.hx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ReadProject {
hxd.Res.initEmbed();
var project = new LdtkProject();

var myLevel = project.all_worlds.Default.all_levels.West;
var myLevel = project.all_worlds.SampleWorld.all_levels.West;

// IntGrid ASCII render
var layer = myLevel.l_Collisions;
Expand Down
2 changes: 1 addition & 1 deletion samples/Heaps - Object tiles/Heaps_ObjectTiles.hx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Heaps_ObjectTiles extends hxd.App {
var project = new LdtkProject();

// Get level data
var level = project.all_worlds.Default.all_levels.West;
var level = project.all_worlds.SampleWorld.all_levels.West;

// Prepare a container for the level layers
var levelBg = new h2d.Object();
Expand Down
2 changes: 1 addition & 1 deletion samples/Heaps - Render IntGrid layer/Heaps_IntGrid.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Heaps_IntGrid extends hxd.App {
var project = new LdtkProject();

// Layer data
var layer = project.all_worlds.Default.all_levels.West.l_Collisions;
var layer = project.all_worlds.SampleWorld.all_levels.West.l_Collisions;

// Prepare a h2d.Graphics to render layer
var g = new h2d.Graphics(s2d);
Expand Down
2 changes: 1 addition & 1 deletion samples/Heaps - Render full world/Heaps_FullWorld.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Heaps_FullWorld extends hxd.App {
var project = new LdtkProject();

// Render each level
for( level in project.all_worlds.Default.levels ) {
for( level in project.all_worlds.SampleWorld.levels ) {
// Create a wrapper to render all layers in it
var levelWrapper = new h2d.Object( s2d );

Expand Down
2 changes: 1 addition & 1 deletion samples/Heaps - Render tile layers/Heaps_TileLayers.hx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Heaps_TileLayers extends hxd.App {
var project = new LdtkProject();

// Get level data
var level = project.all_worlds.Default.all_levels.West;
var level = project.all_worlds.SampleWorld.all_levels.West;

// Level background image
s2d.addChild( level.getBgBitmap() );
Expand Down

0 comments on commit 0541130

Please sign in to comment.