Skip to content

Commit

Permalink
Move main scenes into scenes directory
Browse files Browse the repository at this point in the history
Closes #28
  • Loading branch information
bdero committed Mar 23, 2016
1 parent 0b0aea4 commit 321f7d9
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion engine.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[application]

name="sanic-gaiden"
main_scene="res://main.scn"
main_scene="res://scenes/main.scn"
icon="icon.png"

[autoload]
Expand Down
Binary file removed levels/test_level0.scn
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added scenes/levels/test_level0.scn
Binary file not shown.
Binary file not shown.
Binary file renamed main.scn → scenes/main.scn
Binary file not shown.
File renamed without changes.
6 changes: 3 additions & 3 deletions scripts/globals.gd
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ var paused = false
func _ready():
var main_scene = get_tree().get_root().get_node("main")

camera = ResourceLoader.load("res://camera.scn").instance()
camera = ResourceLoader.load("res://scenes/camera.scn").instance()
main_scene.add_child(camera)

fade = ResourceLoader.load("res://fade.scn").instance()
fade = ResourceLoader.load("res://scenes/fade.scn").instance()
main_scene.add_child(fade)

set_scene("test_level0")
Expand Down Expand Up @@ -99,7 +99,7 @@ func set_scene(scene):
if level != null:
level.queue_free()
# Load the file passed in as the param "scene"
var s = ResourceLoader.load("res://levels/" + scene + ".scn")
var s = ResourceLoader.load("res://scenes/levels/" + scene + ".scn")
# Create an instance of our scene
level = s.instance()
# Add scene to main
Expand Down

0 comments on commit 321f7d9

Please sign in to comment.