for loop
This commit is contained in:
16
dasher.cpp
16
dasher.cpp
@@ -62,11 +62,19 @@ int main() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Nebulea
|
// Nebulea
|
||||||
AnimData nebulae[2] =
|
AnimData nebulae[2]{};
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
nebData,
|
nebulae[i].rec.width = nebula.width / 8;
|
||||||
neb2Data
|
nebulae[i].rec.height = nebula.height / 8;
|
||||||
};
|
nebulae[i].rec.x = 0;
|
||||||
|
nebulae[i].rec.y = 0;
|
||||||
|
nebulae[i].pos.y = windowArray[1] - nebulae[i].rec.height;
|
||||||
|
nebulae[i].frame = 0;
|
||||||
|
nebulae[i].runningTime = 0.0;
|
||||||
|
nebulae[i].updateTime = 1.0 / 16.0;
|
||||||
|
}
|
||||||
|
|
||||||
int nebVel{-200}; // Nebula x velocity (pixels per second)
|
int nebVel{-200}; // Nebula x velocity (pixels per second)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user