Fixed a few more remaining issues.

This commit is contained in:
Relintai 2020-01-04 13:09:34 +01:00
parent bb8dad5d46
commit 2acaa97de9
3 changed files with 8 additions and 9 deletions

View File

@ -14,11 +14,11 @@ body_path = NodePath("KinematicBody2D")
character_skeleton_path = NodePath("KinematicBody2D/Character")
script = ExtResource( 2 )
[node name="NamePlate" parent="." instance=ExtResource( 3 )]
[node name="KinematicBody2D" type="KinematicBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="KinematicBody2D"]
shape = SubResource( 1 )
[node name="Character" parent="KinematicBody2D" instance=ExtResource( 1 )]
[node name="NamePlate" parent="KinematicBody2D" instance=ExtResource( 3 )]

View File

@ -51,7 +51,7 @@ func _ready():
health_bar = get_node(health_bar_path) as TextureProgress
health_bar_label = get_node(health_bar_label_path) as Label
entity = get_node("../..") as Entity
entity = get_node("..") as Entity
health = entity.get_health()
health.connect("c_changed", self, "c_health_changed")
@ -86,10 +86,8 @@ func _process(delta):
var position : Vector2 = entity.get_body().position
position = get_global_transform().xform_inv(position)
position.x -= (rect_size.x / 2.0 + 24) * rect_scale.x
position.y -= 130 * rect_scale.y
position.x -= (rect_size.x / 2.0) * rect_scale.x
position.y -= 60
set_position(position)

View File

@ -11,6 +11,7 @@ script = ExtResource( 1 )
world_layer = ExtResource( 2 )
[node name="Terrarin" type="TileMap" parent="."]
z_index = -10
tile_set = ExtResource( 3 )
cell_size = Vector2( 32, 32 )
format = 1