extends Node

@export var player: Player
@export var layer: bool
@export var inverse: bool

const ATTACK_LAYER: int = 0b10000
const DEFENCE_LAYER: int = 0b100000

func _ready() -> void:
	if is_multiplayer_authority() == false: return
	var mask = (ATTACK_LAYER if (player.team == Session.TEAMS.DEFENCE != inverse) else DEFENCE_LAYER)
	if layer:
		get_parent().collision_layer |= mask
	else:
		get_parent().collision_mask |= mask
