UI impovements.
This commit is contained in:
parent
6961eec7de
commit
0cb827a981
48
Main.tscn
48
Main.tscn
|
|
@ -149,10 +149,17 @@ scroll_limit_end = Vector2( 1300, 0 )
|
||||||
|
|
||||||
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
|
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
|
||||||
motion_mirroring = Vector2( 500, 0 )
|
motion_mirroring = Vector2( 500, 0 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_group_": true,
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="Bgmuck" type="Sprite" parent="ParallaxBackground/ParallaxLayer"]
|
[node name="Bgmuck" type="Sprite" parent="ParallaxBackground/ParallaxLayer"]
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
centered = false
|
centered = false
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="TileMap" type="TileMap" parent="."]
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
tile_set = SubResource( 1 )
|
tile_set = SubResource( 1 )
|
||||||
|
|
@ -170,17 +177,27 @@ position = Vector2( 137, 54 )
|
||||||
[node name="CameraControl" type="Position2D" parent="."]
|
[node name="CameraControl" type="Position2D" parent="."]
|
||||||
process_priority = 1
|
process_priority = 1
|
||||||
script = ExtResource( 5 )
|
script = ExtResource( 5 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_group_": true,
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="Line2D" type="Line2D" parent="CameraControl"]
|
[node name="Line2D" type="Line2D" parent="CameraControl"]
|
||||||
visible = false
|
visible = false
|
||||||
points = PoolVector2Array( 0, 0, 160, 160, 241, 217, 406, 261, 358, 359, 43, 412, 53, 279, 250, 121, 355, -64, -4, 167, -141, -162, -274, -190, -321, 55, -211, 196, 564, 205, -325, -173, 174, -15 )
|
points = PoolVector2Array( 0, 0, 160, 160, 241, 217, 406, 261, 358, 359, 43, 412, 53, 279, 250, 121, 355, -64, -4, 167, -141, -162, -274, -190, -321, 55, -211, 196, 564, 205, -325, -173, 174, -15 )
|
||||||
width = 3.0
|
width = 3.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="CameraControl"]
|
[node name="Camera2D" type="Camera2D" parent="CameraControl"]
|
||||||
process_priority = 1
|
process_priority = 1
|
||||||
anchor_mode = 0
|
anchor_mode = 0
|
||||||
current = true
|
current = true
|
||||||
smoothing_speed = 30.0
|
smoothing_speed = 30.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="Left" type="RayCast2D" parent="CameraControl"]
|
[node name="Left" type="RayCast2D" parent="CameraControl"]
|
||||||
position = Vector2( 160, 90 )
|
position = Vector2( 160, 90 )
|
||||||
|
|
@ -189,6 +206,9 @@ cast_to = Vector2( -160, 0 )
|
||||||
collision_mask = 256
|
collision_mask = 256
|
||||||
collide_with_areas = true
|
collide_with_areas = true
|
||||||
collide_with_bodies = false
|
collide_with_bodies = false
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="Right" type="RayCast2D" parent="CameraControl"]
|
[node name="Right" type="RayCast2D" parent="CameraControl"]
|
||||||
position = Vector2( 160, 90 )
|
position = Vector2( 160, 90 )
|
||||||
|
|
@ -197,33 +217,55 @@ cast_to = Vector2( 160, 0 )
|
||||||
collision_mask = 256
|
collision_mask = 256
|
||||||
collide_with_areas = true
|
collide_with_areas = true
|
||||||
collide_with_bodies = false
|
collide_with_bodies = false
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="CameraBoundaries" type="Area2D" parent="."]
|
[node name="CameraBoundaries" type="Area2D" parent="."]
|
||||||
collision_layer = 256
|
collision_layer = 256
|
||||||
collision_mask = 0
|
collision_mask = 0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="CameraBoundaries"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="CameraBoundaries"]
|
||||||
position = Vector2( 0, 66 )
|
position = Vector2( 0, 66 )
|
||||||
shape = SubResource( 13 )
|
shape = SubResource( 13 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="CollisionShape2D2" type="CollisionShape2D" parent="CameraBoundaries"]
|
[node name="CollisionShape2D2" type="CollisionShape2D" parent="CameraBoundaries"]
|
||||||
position = Vector2( 1281, 68 )
|
position = Vector2( 1281, 68 )
|
||||||
shape = SubResource( 13 )
|
shape = SubResource( 13 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||||
stream = ExtResource( 4 )
|
stream = ExtResource( 4 )
|
||||||
|
|
||||||
[node name="EnemyC" parent="." instance=ExtResource( 7 )]
|
[node name="EnemyC" parent="." instance=ExtResource( 7 )]
|
||||||
position = Vector2( 394, 47 )
|
position = Vector2( 394, 47 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="EnemyC2" parent="." instance=ExtResource( 7 )]
|
[node name="EnemyC2" parent="." instance=ExtResource( 7 )]
|
||||||
position = Vector2( 492, 27 )
|
position = Vector2( 492, 27 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
|
|
||||||
[node name="ActorTemplate" parent="." instance=ExtResource( 6 )]
|
[node name="ActorTemplate" parent="." instance=ExtResource( 6 )]
|
||||||
position = Vector2( 262, 44 )
|
position = Vector2( 262, 44 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_lock_": true
|
||||||
|
}
|
||||||
actor_type = "NPC"
|
actor_type = "NPC"
|
||||||
|
|
||||||
[node name="UI_Layer" type="CanvasLayer" parent="."]
|
[node name="UI_Layer" type="CanvasLayer" parent="."]
|
||||||
|
pause_mode = 2
|
||||||
layer = 2
|
layer = 2
|
||||||
script = ExtResource( 9 )
|
script = ExtResource( 9 )
|
||||||
|
|
||||||
|
|
@ -258,6 +300,12 @@ custom_fonts/font = ExtResource( 8 )
|
||||||
text = "In a world where danger lurks in your plumbing. One thing decides to do another thing and we all determine it wasn't worth it. Hello World"
|
text = "In a world where danger lurks in your plumbing. One thing decides to do another thing and we all determine it wasn't worth it. Hello World"
|
||||||
autowrap = true
|
autowrap = true
|
||||||
|
|
||||||
|
[node name="Polygon2D" type="Polygon2D" parent="UI_Layer/PanelContainer"]
|
||||||
|
position = Vector2( 75, 16.5 )
|
||||||
|
scale = Vector2( 0.769547, 0.833333 )
|
||||||
|
color = Color( 0.533333, 0.533333, 0.533333, 1 )
|
||||||
|
polygon = PoolVector2Array( 294, 63, 300.177, 63, 307, 63, 300.503, 69 )
|
||||||
|
|
||||||
[node name="HealthBar" type="TextureProgress" parent="UI_Layer"]
|
[node name="HealthBar" type="TextureProgress" parent="UI_Layer"]
|
||||||
margin_left = 2.0
|
margin_left = 2.0
|
||||||
margin_top = 2.0
|
margin_top = 2.0
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,14 @@ onready var DialogContainerPortrait = $PanelContainer/HSplitContainer/TextureRec
|
||||||
|
|
||||||
onready var DialogContainerText = $PanelContainer/HSplitContainer/Label
|
onready var DialogContainerText = $PanelContainer/HSplitContainer/Label
|
||||||
|
|
||||||
|
onready var DialogIndicator = $PanelContainer/Polygon2D
|
||||||
|
|
||||||
onready var HUD = $HealthBar
|
onready var HUD = $HealthBar
|
||||||
|
|
||||||
var current_pane
|
var current_pane
|
||||||
|
|
||||||
|
var tween
|
||||||
|
|
||||||
# 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():
|
||||||
# How to change to a differant portrait picture.
|
# How to change to a differant portrait picture.
|
||||||
|
|
@ -23,9 +27,14 @@ func _ready():
|
||||||
#DialogContainerText.text = UiManager.dialog_text
|
#DialogContainerText.text = UiManager.dialog_text
|
||||||
UiManager.current_pane = UiManager.UI_PANES.HUD
|
UiManager.current_pane = UiManager.UI_PANES.HUD
|
||||||
#DialogContainer.visible = false
|
#DialogContainer.visible = false
|
||||||
|
tween = get_tree().create_tween().set_loops()
|
||||||
|
tween.tween_property(DialogIndicator, "modulate", Color.darkgray, 1)
|
||||||
|
tween.tween_property(DialogIndicator, "modulate", Color.white , 1)
|
||||||
|
##tween.tween_property(DialogIndicator, "modulate", Color.RED, 1)
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
|
|
||||||
if (UiManager.current_pane != current_pane):
|
if (UiManager.current_pane != current_pane):
|
||||||
print("UI Switch detected")
|
print("UI Switch detected")
|
||||||
current_pane = UiManager.current_pane
|
current_pane = UiManager.current_pane
|
||||||
|
|
@ -40,6 +49,7 @@ func _process(delta):
|
||||||
DialogContainerPortrait.texture = UiManager.dialog_portrait
|
DialogContainerPortrait.texture = UiManager.dialog_portrait
|
||||||
DialogContainerText.text = UiManager.dialog_text
|
DialogContainerText.text = UiManager.dialog_text
|
||||||
DialogContainer.visible = true
|
DialogContainer.visible = true
|
||||||
|
#get_tree().paused = true
|
||||||
_: # Implicitly off
|
_: # Implicitly off
|
||||||
print("UI Turned off")
|
print("UI Turned off")
|
||||||
|
|
||||||
|
|
@ -47,3 +57,4 @@ func _process(delta):
|
||||||
func _unhandled_input(event):
|
func _unhandled_input(event):
|
||||||
if current_pane == UiManager.UI_PANES.DIALOG and Input.is_action_just_pressed("ui_accept"):
|
if current_pane == UiManager.UI_PANES.DIALOG and Input.is_action_just_pressed("ui_accept"):
|
||||||
UiManager.current_pane = UiManager.UI_PANES.HUD
|
UiManager.current_pane = UiManager.UI_PANES.HUD
|
||||||
|
#get_tree().paused = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user