mirror of
https://github.com/Relintai/broken_seals_2d.git
synced 2024-11-11 20:35:10 +01:00
Fixed a few more remaining issues.
This commit is contained in:
parent
bb8dad5d46
commit
2acaa97de9
@ -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 )]
|
||||
|
@ -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")
|
||||
@ -77,19 +77,17 @@ func _ready():
|
||||
func _process(delta):
|
||||
if interpolating:
|
||||
var d : Vector2 = ((target_scale - get_scale()).normalized() * delta) + get_scale()
|
||||
|
||||
|
||||
set_scale(d)
|
||||
|
||||
|
||||
if (get_scale() - target_scale).length() < 0.04:
|
||||
interpolating = false
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user