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)
|
||||
1
scripts/player/collision_team_updater.gd.uid
Normal file
1
scripts/player/collision_team_updater.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://5gwpjiswnegn
|
||||
|
|
@ -2,6 +2,8 @@ extends CharacterBody3D
|
|||
|
||||
class_name Player
|
||||
|
||||
@export var team: Session.TEAMS
|
||||
|
||||
const MAX_HP = 100
|
||||
|
||||
@export var hp: int = 100:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue