Exemple #1
0
    protected override void Init()
    {
        base.Init();

        if (texture == null)
        {
            texture = base.GetTextureFromColor(color);
        }

        int w = Screen.width + columns;
        int h = Screen.height + columns;

        rows = h / (w / columns) + 2;

        squares = new AnimRect[columns, rows];
        for (int c = 0; c < columns; c++)
        {
            for (int r = 0; r < rows; r++)
            {
                squares[c, r] = new AnimRect(
                    new Rect(
                        w / columns * c,
                        h / rows * r,
                        w / columns,
                        h / rows)
                    , 0.1f, 1f);
            }
        }

        last_columns = columns;
    }
Exemple #2
0
    protected override void Init()
    {
        base.Init();

        texture = base.GetTextureFromColor(color);

        rcs = new AnimRect[numberOfStripes];
        int a = Screen.width / rcs.Length * 3;

        for (int i = 0; i < rcs.Length; i++)
        {
            rcs[i] = new AnimRect(
                new Rect((Screen.width + a) / rcs.Length * i - 5, -5, (Screen.width + a) / rcs.Length, Screen.height + 10),
                0.1f,
                1f);
        }

        last_color           = color;
        last_numberOfStripes = numberOfStripes;
    }