20 lines
351 B
GDScript3
20 lines
351 B
GDScript3
|
extends Node3D
|
||
|
|
||
|
enum teams {
|
||
|
team_CS = -1,
|
||
|
team_OS = 1
|
||
|
}
|
||
|
|
||
|
@onready var spawnpoints = [
|
||
|
Vector3(0, 1, 0),
|
||
|
Vector3(scale.x, 2, scale.z),
|
||
|
Vector3(-scale.x, 2, scale.z),
|
||
|
Vector3(scale.x, 2, -scale.z),
|
||
|
Vector3(-scale.x, 2, -scale.z)
|
||
|
]
|
||
|
|
||
|
@export var team:teams
|
||
|
|
||
|
func get_class_spawnpoint(class_id):
|
||
|
return position + (spawnpoints[abs(class_id) - 1])
|