RandomColor: comments

This commit is contained in:
MrGadget 2024-10-14 02:26:18 -04:00
parent 31ac5ad5de
commit 1f9faf2044

View File

@ -21,8 +21,8 @@ void SetColor(Color32 _, Color32 newColor)
public override void OnStartServer() public override void OnStartServer()
{ {
// Only set the color once. Players may be respawned, // Only set the color once. Players / objects may be unspawned and
// and we don't want to keep changing their colors. // respawned and we don't want to keep changing their colors.
if (color == Color.black) if (color == Color.black)
color = Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 1f); color = Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 1f);
} }