コード例 #1
0
    void Start()
    {
        LevelColors = ColorFactory.FromTheme(Theme);

        var solidBlocks = GameObject.FindGameObjectsWithTag("Solid");

        Colorize(solidBlocks, ColorFactory.Black);

        _player               = GameObject.FindGameObjectWithTag("Player");
        _color1Blocks         = GameObject.FindGameObjectsWithTag("Color1");
        _color2Blocks         = GameObject.FindGameObjectsWithTag("Color2");
        _colorMixedBlocks     = GameObject.FindGameObjectsWithTag("ColorMixed");
        _antiColor1Blocks     = GameObject.FindGameObjectsWithTag("AntiColor1");
        _antiColor2Blocks     = GameObject.FindGameObjectsWithTag("AntiColor2");
        _antiColorMixedBlocks = GameObject.FindGameObjectsWithTag("AntiColorMixed");

        Colorize(_color1Blocks, LevelColors.Color1);
        Colorize(_color2Blocks, LevelColors.Color2);
        Colorize(_colorMixedBlocks, LevelColors.ColorMixed);
        Colorize(_antiColor1Blocks, LevelColors.Color1);
        Colorize(_antiColor2Blocks, LevelColors.Color2);
        Colorize(_antiColorMixedBlocks, LevelColors.ColorMixed);

        Colorize(GameObject.FindGameObjectsWithTag("Trigger"), ColorFactory.Transparent);
        Colorize(GameObject.FindGameObjectsWithTag("ZeroGravity"), ColorFactory.Gray);

        UpdateColors(ColorInput.None);
    }