opengl 长方体
- 作者: 6pa
- 来源: 51数据库
- 2020-11-25
在OnTimer()函数中判断一下copy,第一个是否增长到最大了。
伪代码:
if(长方体1.shiyanx >= 50)
{
if(长方体2.shiyanx <= 50)
{
长方体2.shiyanx += 1;
长方体2.startx += 0.5
}
}
else
{
长方体1.shiyanx+=1;
长方体1.startx+=0.5;
}
伪代码:
if(长方体1.shiyanx >= 50)
{
if(长方体2.shiyanx <= 50)
{
长方体2.shiyanx += 1;
长方体2.startx += 0.5
}
}
else
{
长方体1.shiyanx+=1;
长方体1.startx+=0.5;
}
推荐阅读