Ogres can die
This commit is contained in:
parent
7faf33349c
commit
47e430cede
|
@ -1,6 +1,6 @@
|
||||||
extends Enemy
|
extends Enemy
|
||||||
|
|
||||||
var contact_damage = 0.5
|
var contact_damage = 1.5
|
||||||
|
|
||||||
onready var Spr = $Sprite
|
onready var Spr = $Sprite
|
||||||
onready var DamageCD = $DamageCD
|
onready var DamageCD = $DamageCD
|
||||||
|
@ -20,6 +20,9 @@ func _physics_process(delta):
|
||||||
Spr.flip_h = true
|
Spr.flip_h = true
|
||||||
velocity.x = -speed
|
velocity.x = -speed
|
||||||
|
|
||||||
|
if health <= 0:
|
||||||
|
queue_free()
|
||||||
|
|
||||||
if not is_on_floor():
|
if not is_on_floor():
|
||||||
velocity.y = 10
|
velocity.y = 10
|
||||||
|
|
||||||
|
|
|
@ -252,5 +252,5 @@ autoplay = "Type Writer"
|
||||||
"anims/Type Writer" = SubResource( 8 )
|
"anims/Type Writer" = SubResource( 8 )
|
||||||
|
|
||||||
[node name="Ogre" parent="." instance=ExtResource( 8 )]
|
[node name="Ogre" parent="." instance=ExtResource( 8 )]
|
||||||
position = Vector2( 89.8511, 126.388 )
|
position = Vector2( 179.376, 152.61 )
|
||||||
[connection signal="body_entered" from="Area2D" to="text/Text2" method="_on_body_entered"]
|
[connection signal="body_entered" from="Area2D" to="text/Text2" method="_on_body_entered"]
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
extends Wand
|
extends Wand
|
||||||
|
|
||||||
|
|
||||||
func fire(projectile, effect):
|
func fire(projectile, effect):
|
||||||
if $ShootDelay.is_stopped() and projectile != null:
|
if $ShootDelay.is_stopped() and projectile != null:
|
||||||
var temp1 = projectile.instance()
|
var temp1 = projectile.instance()
|
||||||
|
|
|
@ -97,6 +97,13 @@ texture={
|
||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
|
||||||
|
ui_up={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
up={
|
up={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||||
|
|
Loading…
Reference in a new issue