Mob Death: Line Doesn't Point to Dead
parent
ea0172c66d
commit
34e40a666e
|
@ -5,10 +5,10 @@
|
|||
[ext_resource path="res://res/shaders/colorize.tres" type="Material" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 3.5, 3.5 )
|
||||
extents = Vector2( 4, 4 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
extents = Vector2( 3.5, 9 )
|
||||
extents = Vector2( 7, 11 )
|
||||
|
||||
[sub_resource type="Animation" id=4]
|
||||
resource_name = "RESET"
|
||||
|
@ -48,7 +48,7 @@ tracks/0/loop_wrap = true
|
|||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 2 ),
|
||||
"times": PoolRealArray( 0, 0.9 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ true, false ]
|
||||
|
|
|
@ -79,7 +79,7 @@ func _shoot():
|
|||
bullet.global_position.y = self.global_position.y + 8
|
||||
|
||||
func _draw():
|
||||
if target != null and is_instance_valid(target):
|
||||
if target != null and is_instance_valid(target) and not target.dead:
|
||||
var dist2enemy = position.distance_to(target.global_position)
|
||||
var mob_offset = Vector2.ZERO
|
||||
if target.is_in_group("bat"):
|
||||
|
|
Loading…
Reference in New Issue