mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-13 22:12:23 +02:00
added Fireknockback and added beartrap slowdown(not stun)
This commit is contained in:
@@ -1,5 +1,24 @@
|
||||
extends Node2D
|
||||
|
||||
export(float,0.1,10.0) var burning_time = 2.0
|
||||
var timer = Timer.new()
|
||||
|
||||
|
||||
func on_timer_timeout():
|
||||
timer.stop()
|
||||
queue_free()
|
||||
|
||||
func _ready():
|
||||
$Sprite.play("burn")
|
||||
add_child(timer)
|
||||
timer.connect("timeout", self, "on_timer_timeout")
|
||||
timer.set_wait_time(burning_time)
|
||||
timer.start()
|
||||
|
||||
|
||||
|
||||
|
||||
func _on_Hitbox_body_entered(body):
|
||||
if(body.get_name() == "Player"):
|
||||
body.velocity*=-3
|
||||
|
||||
|
||||
@@ -93,5 +93,6 @@ collision_layer = 16
|
||||
[node name="CollisionShape2D" parent="Hitbox" index="0"]
|
||||
position = Vector2( -0.157784, -0.157772 )
|
||||
shape = SubResource( 2 )
|
||||
[connection signal="body_entered" from="Hitbox" to="." method="_on_Hitbox_body_entered"]
|
||||
|
||||
[editable path="Hitbox"]
|
||||
|
||||
Reference in New Issue
Block a user