Merge branch 'main' of https://gitty.informatik.hs-mannheim.de/3002102/gae_wild_jam
commit
671c046c3c
|
|
@ -3,7 +3,7 @@ extends EnemyBase
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
super()
|
super()
|
||||||
speed = 0.1
|
speed = 15.0
|
||||||
hits_remaining = 2
|
hits_remaining = 2
|
||||||
$Area2D.body_entered.connect(_on_area_2d_body_entered)
|
$Area2D.body_entered.connect(_on_area_2d_body_entered)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,10 @@ func _process(delta: float) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func _chase_witch() -> void:
|
func _chase_witch() -> void:
|
||||||
var direction = Vector2(witch.global_position - global_position)
|
var direction = Vector2(witch.global_position - global_position).normalized()
|
||||||
if direction != Vector2.ZERO:
|
if direction != Vector2.ZERO:
|
||||||
last_direction = direction
|
last_direction = direction
|
||||||
velocity = direction * speed
|
velocity = direction * speed
|
||||||
velocity = direction * speed
|
|
||||||
|
|
||||||
if direction == Vector2.ZERO:
|
if direction == Vector2.ZERO:
|
||||||
animated_sprite_2d.play("idle")
|
animated_sprite_2d.play("idle")
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ extends EnemyBase
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
super()
|
super()
|
||||||
speed = 0.1
|
speed = 15.0
|
||||||
hits_remaining = 3
|
hits_remaining = 3
|
||||||
$Area2D.body_entered.connect(_on_area_2d_body_entered)
|
$Area2D.body_entered.connect(_on_area_2d_body_entered)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ extends EnemyBase
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.+
|
# Called every frame. 'delta' is the elapsed time since the previous frame.+
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
super()
|
super()
|
||||||
speed = 0.1
|
speed = 15.0
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
if is_dying:
|
if is_dying:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue