mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-13 14:02:23 +02:00
cleanup
This commit is contained in:
@@ -45,7 +45,7 @@ func _debug_update():
|
||||
debug_label.text = str(player_stats.health) + "/" + str(player_stats.max_health) + " HP\n" + str(currency) + " €"
|
||||
|
||||
func _ready():
|
||||
grid = get_tree().current_scene.get_child(3)
|
||||
grid = get_tree().current_scene.get_node("Grid")
|
||||
|
||||
func _physics_process(delta):
|
||||
totaldamage+=(damage_per_second - heal_per_second)*delta
|
||||
@@ -172,8 +172,6 @@ func roll_finished():
|
||||
func _on_Hurtbox_area_entered(area):
|
||||
player_stats.health-=area.damage
|
||||
|
||||
print("enter")
|
||||
|
||||
if area.damage > 0:
|
||||
damage_per_second += area.damage
|
||||
else:
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
[ext_resource path="res://Player/PlayerStateMachine.gd" type="Script" id=15]
|
||||
[ext_resource path="res://Player/States/Roll.gd" type="Script" id=16]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=50]
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 3.0
|
||||
|
||||
[sub_resource type="Animation" id=2]
|
||||
@@ -596,7 +596,7 @@ blend_mode = 1
|
||||
states/hit/node = SubResource( 22 )
|
||||
states/hit/position = Vector2( 511, 196 )
|
||||
states/idle/node = SubResource( 27 )
|
||||
states/idle/position = Vector2( 203, 196 )
|
||||
states/idle/position = Vector2( 202, 196 )
|
||||
states/roll/node = SubResource( 32 )
|
||||
states/roll/position = Vector2( 511, 90 )
|
||||
states/run/node = SubResource( 37 )
|
||||
@@ -637,12 +637,12 @@ scale = Vector2( 0.5, 0.5 )
|
||||
texture = ExtResource( 2 )
|
||||
offset = Vector2( 0, -18 )
|
||||
hframes = 60
|
||||
frame = 12
|
||||
frame = 7
|
||||
|
||||
[node name="Body" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0.0107212, 0.0456073 )
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 50 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
anims/HitDown = SubResource( 2 )
|
||||
@@ -670,7 +670,7 @@ parameters/playback = SubResource( 45 )
|
||||
parameters/hit/blend_position = Vector2( 0.032258, -0.777778 )
|
||||
parameters/idle/blend_position = Vector2( -0.646202, 0.122222 )
|
||||
parameters/roll/blend_position = Vector2( 0.0166494, -0.387619 )
|
||||
parameters/run/blend_position = Vector2( 0.0697191, -0.967302 )
|
||||
parameters/run/blend_position = Vector2( -0.0104058, -1.05259 )
|
||||
|
||||
[node name="Hitbox" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 0, 0.0375252 )
|
||||
|
||||
@@ -4,5 +4,5 @@ func enter():
|
||||
animation_playback.travel("idle")
|
||||
|
||||
func update(delta):
|
||||
var input_vector = get_input_direction()
|
||||
var input_vector = owner.rollvector
|
||||
animation_tree.set("parameters/idle/blend_position", input_vector)
|
||||
|
||||
Reference in New Issue
Block a user