ad48f38ca5
Replaces the overhead box-mesh view with a full FPS character: - mouse look, WASD movement, jump (Space), crouch (C), sprint (Shift), lean (Q/E) - 6 weapons (LMB shoot, R reload, scroll switch, F melee, G drop) - Crosshair HUD, ammo counter, sprint bar - Client sends position to server at 20Hz for multiplayer visibility - Server broadcasts positions to all peers - Remote players shown as boxes (placeholder) source: https://godotengine.org/asset-library/asset/2652 (MIT license)
16 lines
283 B
GDScript
16 lines
283 B
GDScript
extends RigidBody3D
|
|
|
|
signal Hit_Successfull
|
|
|
|
var damage: int = 0
|
|
|
|
func _on_body_entered(body):
|
|
if body.is_in_group("Target") && body.has_method("Hit_Successful"):
|
|
body.Hit_Successful(damage)
|
|
emit_signal("Hit_Successfull")
|
|
|
|
queue_free()
|
|
|
|
func _on_timer_timeout():
|
|
queue_free()
|