add boss enemy and refactor

This commit is contained in:
2025-10-22 16:42:26 +01:00
parent bfefcffb1f
commit c7933ca7b8
11 changed files with 501 additions and 24 deletions

View File

@@ -1,16 +1,11 @@
extends Area2D
@export var animation_player: AnimationPlayer
@export var animation_name: String
@export var animated_sprite: AnimatedSprite2D
@export var animated_sprite_name: String
@export var player_bounce: int
signal hit
func _on_body_entered(player_body: Node2D) -> void:
var player_character_body = player_body as CharacterBody2D
player_character_body.velocity.y = player_bounce
hit.emit()
animated_sprite.play(animated_sprite_name)
animation_player.play(animation_name)