private void Start() { currentColor = (ColorType)Random.Range(0, Technical.EnumCount <ColorType>()); ChangeColor(currentColor); speedAdjustAction?.Invoke(currentSpeed); }
private void Start() { colorType = (ColorType)Random.Range(0, Technical.EnumCount <ColorType>()); var main = particleSystem.main; switch (colorType) { case ColorType.Green: main.startColor = Color.green; break; case ColorType.Red: main.startColor = Color.red; break; case ColorType.Yellow: main.startColor = Color.yellow; break; } }