move the level instance to a level node so that pausing the game doesn't effect the main node
This commit is contained in:
parent
8cfa1d5cce
commit
4267332d70
@ -5,7 +5,11 @@
|
|||||||
[ext_resource path="res://monitor/Monitor.tscn" type="PackedScene" id=3]
|
[ext_resource path="res://monitor/Monitor.tscn" type="PackedScene" id=3]
|
||||||
|
|
||||||
[node name="Main" type="Node"]
|
[node name="Main" type="Node"]
|
||||||
|
pause_mode = 2
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
level = ExtResource( 2 )
|
level = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="Level" type="Node" parent="."]
|
||||||
|
pause_mode = 1
|
||||||
|
|
||||||
[node name="Monitor" parent="." instance=ExtResource( 3 )]
|
[node name="Monitor" parent="." instance=ExtResource( 3 )]
|
||||||
|
@ -52,7 +52,7 @@ void Main::_ready()
|
|||||||
|
|
||||||
if (level != NULL)
|
if (level != NULL)
|
||||||
{
|
{
|
||||||
add_child(level->instance());
|
get_node("Level")->add_child(level->instance());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user