mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-15 16:34:48 +00:00
✨ enforce static typing
This commit is contained in:
parent
09880cc957
commit
e44426c2cc
36 changed files with 271 additions and 374 deletions
|
|
@ -17,10 +17,10 @@ class_name ExplosiveDamageComponent extends Area3D
|
|||
@export var damage : int = 100
|
||||
@export var impulse_force : int = 1000
|
||||
|
||||
func _physics_process(_delta):
|
||||
func _physics_process(_delta : float) -> void:
|
||||
for body in get_overlapping_bodies():
|
||||
if body is RigidBody3D:
|
||||
var direction = (body.global_position - global_position).normalized()
|
||||
var direction : Vector3 = (body.global_position - global_position).normalized()
|
||||
body.apply_central_impulse(direction * impulse_force)
|
||||
|
||||
for area in get_overlapping_areas():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue