예제 #1
0
    private void Start()
    {
        currentColor = (ColorType)Random.Range(0, Technical.EnumCount <ColorType>());
        ChangeColor(currentColor);

        speedAdjustAction?.Invoke(currentSpeed);
    }
예제 #2
0
    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;
        }
    }