multiplayer

This commit is contained in:
Rendo 2025-11-22 01:07:18 +05:00
commit 0dc6247f91
22 changed files with 298 additions and 14 deletions

22
scripts/smoke_grenade.gd Normal file
View file

@ -0,0 +1,22 @@
extends RigidBody3D
@export var radius: float
@export var fog: FogVolume
var bounce_count: int = 0
func _on_body_entered(_body: Node) -> void:
if bounce_count > 2:
return
bounce_count += 1
if bounce_count == 2:
smoke()
func smoke():
var tween = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_EXPO)
tween.tween_property(fog,"size",Vector3(radius,radius,radius),1.0)
tween.tween_interval(10)
tween.tween_property(fog.material,"density",0,1.0)
tween.tween_callback(queue_free)