added the game

This commit is contained in:
JHDev2006
2025-09-13 16:30:32 +01:00
parent 5ef689109b
commit 3773bdaf64
3616 changed files with 263702 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
extends Enemy
var in_egg := false
const MOVE_SPEED := 40
func _physics_process(delta: float) -> void:
handle_movement(delta)
func handle_movement(_delta: float) -> void:
if in_egg:
if is_on_floor():
var player = get_tree().get_first_node_in_group("Players")
direction = sign(player.global_position.x - global_position.x)
in_egg = false
$Sprite.play("Egg")
else:
$Sprite.play("Walk")
$Sprite.scale.x = direction