Beispiel #1
0
    public Shape(Shapes.ShapeValue values, int x, int y)
    {
        matrix = new Dictionary <Key2D, Color>();
        Color shapeColor = Colorizer.Instance.GetColor();

        int k = 0;

        for (int i = 0; i < values.xSize; i++)
        {
            for (int j = 0; j < values.ySize; j++)
            {
                if (values.values[k])
                {
                    matrix.Add(new Key2D(x + i, y + j), shapeColor);
                }
                k++;
            }
        }
    }
Beispiel #2
0
 void InitNext()
 {
     Debug.Log("Init next shape");
     nextShape = shapeFactory.GetShape();
 }
Beispiel #3
0
 public void Init(Shapes.ShapeValue values)
 {
     levelShape = new LevelShape(values, 0, 0);
     Align();
 }
Beispiel #4
0
 public LevelShape(Shapes.ShapeValue values, int x, int y) : base(values, x, y)
 {
 }