mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 23:48:11 +00:00
added the game
This commit is contained in:
10
Scripts/Classes/Entities/Enemies/BasicEnemy.gd
Executable file
10
Scripts/Classes/Entities/Enemies/BasicEnemy.gd
Executable file
@@ -0,0 +1,10 @@
|
||||
extends Enemy
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
handle_movement(delta)
|
||||
|
||||
func handle_movement(delta: float) -> void:
|
||||
apply_enemy_gravity(delta)
|
||||
if is_on_floor():
|
||||
velocity.x = lerpf(velocity.x, 0, delta * 10)
|
||||
move_and_slide()
|
Reference in New Issue
Block a user