mirror of
https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git
synced 2025-08-22 20:25:28 +08:00
Update 08 Powerups.md
修改错字
This commit is contained in:
@@ -209,7 +209,7 @@ if (!Ball->Stuck && std::get<0>(result))
|
||||
|
||||
在这里我们将小球的Stuck属性设置为它自己的Sticky属性,若**Stikcy**效果被激活,那么小球则会在与挡板接触时粘在上面,玩家不得不再次按下空格键才能释放它。
|
||||
|
||||
在同样的<fun>DoCollisions</fun>函数中还有个为了实现**Pass-through**效果的类似小改动。当小球的<var>PassThrough</var>属性被设置为true时,我们不对非实习砖块做碰撞处理操作。
|
||||
在同样的<fun>DoCollisions</fun>函数中还有个为了实现**Pass-through**效果的类似小改动。当小球的<var>PassThrough</var>属性被设置为true时,我们不对非实心砖块做碰撞处理操作。
|
||||
|
||||
```c++
|
||||
Direction dir = std::get<1>(collision);
|
||||
@@ -334,4 +334,4 @@ void Game::Render()
|
||||
|
||||
你可以在下面找到所有更新后的代码(当关卡重置时我们同时重置所有道具效果):
|
||||
|
||||
- **Game**: [头文件](https://learnopengl.com/code_viewer.php?code=in-practice/breakout/game_powerups.h),[代码](https://learnopengl.com/code_viewer.php?code=in-practice/breakout/game_powerups)
|
||||
- **Game**: [头文件](https://learnopengl.com/code_viewer.php?code=in-practice/breakout/game_powerups.h),[代码](https://learnopengl.com/code_viewer.php?code=in-practice/breakout/game_powerups)
|
||||
|
Reference in New Issue
Block a user