Teams
This commit is contained in:
parent
af094878b9
commit
6d34205ba2
7 changed files with 31 additions and 2 deletions
10
scripts/player/collision_team_updater.gd
Normal file
10
scripts/player/collision_team_updater.gd
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
extends Node
|
||||
|
||||
@export var player: Player
|
||||
|
||||
const ATTACK_LAYER: int = 0b10000
|
||||
const DEFENCE_LAYER: int = 0b100000
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
get_parent().collision_mask |= (ATTACK_LAYER if player.team == Session.TEAMS.DEFENCE else DEFENCE_LAYER)
|
||||
Loading…
Add table
Add a link
Reference in a new issue