added Fireknockback and added beartrap slowdown(not stun)

This commit is contained in:
Jan Schuffenhauer
2020-04-20 19:17:08 +02:00
parent 512fffee8d
commit ebad05009a
7 changed files with 36 additions and 13 deletions

View File

@@ -80,6 +80,7 @@ shape = SubResource( 2 )
[node name="Hurtbox" parent="." instance=ExtResource( 35 )]
collision_layer = 32
collision_mask = 0
slowdown_value = 300
[node name="CollisionShape2D" parent="Hurtbox" index="0"]
rotation = 1.5708

View File

@@ -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

View File

@@ -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"]

View File

@@ -6,7 +6,8 @@
[ext_resource path="res://Objects/Card/level0.png" type="Texture" id=4]
[ext_resource path="res://Objects/Card/level2.png" type="Texture" id=5]
[ext_resource path="res://Objects/Card/level1.png" type="Texture" id=6]
[ext_resource path="res://Objects/Traps/Sting/Sting.tscn" type="PackedScene" id=7]
[ext_resource path="res://Objects/Traps/Sting (UNUSED)/Sting.tscn" type="PackedScene" id=7]
[sub_resource type="SpriteFrames" id=1]
animations = [ {