Feb 11, 2025
if the screen is not shaking:
global position = lerp(global position, Vector2(320, 180), 0.3)
Goals: Create a more efficient enemy system with fewer duplications in code.
Scene Inheritance Concept:
enemy core as a base script for all enemies.Implementation Steps:
enemy core script inheriting from Sprite.enemy core.enemy core.Custom functions for movement:
basic movement towards player function allowing flexibility for different enemy behaviors.export(int) var HP = 3
enemy.tscn).enemy dash).enemy_number = randi() % enemies.size()