Ogres can die

This commit is contained in:
Diego 2020-07-20 00:10:29 -05:00
parent 7faf33349c
commit 47e430cede
4 changed files with 12 additions and 3 deletions

View file

@ -1,6 +1,6 @@
extends Enemy
var contact_damage = 0.5
var contact_damage = 1.5
onready var Spr = $Sprite
onready var DamageCD = $DamageCD
@ -19,6 +19,9 @@ func _physics_process(delta):
elif player.x < global_position.x:
Spr.flip_h = true
velocity.x = -speed
if health <= 0:
queue_free()
if not is_on_floor():
velocity.y = 10

View file

@ -252,5 +252,5 @@ autoplay = "Type Writer"
"anims/Type Writer" = SubResource( 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"]

View file

@ -1,6 +1,5 @@
extends Wand
func fire(projectile, effect):
if $ShootDelay.is_stopped() and projectile != null:
var temp1 = projectile.instance()

View file

@ -97,6 +97,13 @@ texture={
[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={
"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)