blob: d0fbff53b35be42e181a98b4364d4e1098fbac30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
class_name Player
extends Node
var username: String
var id: int:
set(value):
id = value
name = str(value)
var units: Array[Unit]
var towers: Dictionary :
set(value):
towers = value
func get_color():
if id == 1:
return Color("#fff")
var rng = RandomNumberGenerator.new()
rng.seed = id
@warning_ignore("integer_division")
return Color(rng.randf(), rng.randf(), rng.randf())
|