forked from team-sg/hero-mark-2
detach pause screen from camera (fixes #36)
This commit is contained in:
parent
4c3e7ab2ac
commit
cf4c987245
3 changed files with 4 additions and 3 deletions
2
game.gd
2
game.gd
|
@ -152,4 +152,4 @@ func _process(delta):
|
||||||
#Pause
|
#Pause
|
||||||
if Input.is_action_just_pressed("pause"):
|
if Input.is_action_just_pressed("pause"):
|
||||||
var viewport = get_parent().get_node("Main/Control/ViewportContainer/Viewport")
|
var viewport = get_parent().get_node("Main/Control/ViewportContainer/Viewport")
|
||||||
instance_node(pause_screen,0,0,viewport)
|
viewport.add_child(pause_screen.instance())
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
extends Node2D
|
extends CanvasLayer
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
[ext_resource path="res://graphics/hud/pause_arrow.png" type="Texture" id=3]
|
[ext_resource path="res://graphics/hud/pause_arrow.png" type="Texture" id=3]
|
||||||
[ext_resource path="res://objects/hud/pause_screen.gd" type="Script" id=4]
|
[ext_resource path="res://objects/hud/pause_screen.gd" type="Script" id=4]
|
||||||
|
|
||||||
[node name="PauseScreen" type="Node2D"]
|
[node name="PauseScreen" type="CanvasLayer"]
|
||||||
pause_mode = 2
|
pause_mode = 2
|
||||||
|
layer = 100
|
||||||
script = ExtResource( 4 )
|
script = ExtResource( 4 )
|
||||||
|
|
||||||
[node name="TileMap" type="TileMap" parent="."]
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue