public static Sprite[] FillDictionaryWithPoints (Dictionary<Sprite, PointPx> dictionary) {
        var result = new List<Sprite>();

        int top = 0, bottom = 4;
        int left = 0, right = 4;

        for (int y = top; y < bottom; y++) {
            for (int x = left; x < right; x++) {
                Sprite s = new Sprite();

                if (s != null)
                    dictionary[s] = new PointPx(x * 16 + 8, y * 16 + 8);

                result.Add(s);
            }
        }

        return result.ToArray();
    }
Пример #2
0
    public static Sprite[] FillDictionaryWithPoints(Dictionary <Sprite, PointPx> dictionary)
    {
        var result = new List <Sprite>();

        int top = 0, bottom = 4;
        int left = 0, right = 4;

        for (int y = top; y < bottom; y++)
        {
            for (int x = left; x < right; x++)
            {
                Sprite s = new Sprite();

                if (s != null)
                {
                    dictionary[s] = new PointPx(x * 16 + 8, y * 16 + 8);
                }

                result.Add(s);
            }
        }

        return(result.ToArray());
    }