问题描述
我想实现这段代码:
enum blockState { unhit,hit,dead };
void spawnBlocks(EntityMesh* blockMesh,std::vector<Entity*> &blockVec)
{
float xOfBlockWall = -55.0f; //Initial position of the wall of blocks
for (int i = 0; i < 10; i++) //For loop that automatically renders the blocks & puts them in place with proper distance between them
{
blockVec.push_back(blockMesh->CreateModel(xOfBlockWall,5,120));
xOfBlockWall += 12; //incrementing the value of x so the blocks generate with proper distance between them
block blockState::unhit;<===============
}
}
我已经强调了问题所在,我想要的基本上是每个块都有一个可以稍后更新的单独状态,我应该如何处理?
提前致谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)