Hello people.
I just started learn Godot and i want to make simple game.
Now, i need to create a grid 6x6 with blocks and move to upward them smoothly. Wherein i need to create new row of blocks under that grid and that it was happened constantly. That is moving up then new row under them, moving up -> new row.!
BlocksGrid
with this code that i writed myself:
for(int i = 0; i < row; i++)
{
for(int j = 0; j < col; j++)
{
int rndColor = rnd.Next(3);
PackedScene rect = rectArray[rndColor];
rectInstance = (RigidBody2D)rect.Instance();
rectInstance.Position = new Vector2(SpawnPosX * i + 200, SpawnPosY * j + 360);
AddChild(rectInstance);
}
}
But if i trying move the blocks then only last block is moved.
How is better to make what i want? Sorry for my English.