mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-14 07:56:32 +00:00
✨ Add flag grabbing/carrying scoring logic
This commit is contained in:
parent
232eb960ab
commit
61b8845a40
8 changed files with 65 additions and 30 deletions
|
|
@ -21,6 +21,7 @@ class_name FlagCarryComponent extends Node
|
|||
@export var max_throw_speed : float = 10.0
|
||||
@export var attachment : Node3D
|
||||
@export var sensor : Area3D
|
||||
@export var carrier : Player
|
||||
|
||||
var _carried_flag : Flag
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ func _process(_delta : float) -> void:
|
|||
|
||||
func _grab(flag : Flag) -> void:
|
||||
if not _is_carrying():
|
||||
flag.grab()
|
||||
flag.grab(carrier)
|
||||
_carried_flag = flag
|
||||
|
||||
func _release(inherited_velocity : Vector3, throw_speed : float) -> void:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue