diff --git a/systems/bullets/bullet.gd b/systems/bullets/bullet.gd index cbf0c5c..178dca1 100644 --- a/systems/bullets/bullet.gd +++ b/systems/bullets/bullet.gd @@ -39,6 +39,8 @@ const INITIAL_ALLOCATED_BULLETS: int = 2000 ## The amount of time in seconds that the bullet has existed. var time_elapsed: float = 0.0 +## If the bullet has been grazed before +var grazed: bool = false static var _cached_bullets: Array[Bullet] = [] static var _hitbox_shapes: Dictionary[Vector2i, RectangleShape2D] = {} @@ -65,6 +67,7 @@ static func create( bullet.direction = direction bullet.face_direction = face_direction bullet.time_elapsed = 0.0 + bullet.grazed = false return bullet