我目前正在尝试重现经典的小行星游戏。
到目前为止,我已经设法在我的屏幕上创建了一个矢量三角形,并且我已经能够使这个三角形围绕原点旋转。我现在正在尝试让三角形以与原始游戏中的船相同的方式移动,带着那种漂浮/在冰上的感觉。然而,我的问题是,当按下向上按钮时,船的行进方向与三角形的方向不一致。也就是说,三角形在错误的方向上移动,看起来很愚蠢。
我非常确定三角形运动的物理原理是正确的,所以我认为误差可能与三角形的定义有关,但我不确定。我的代码如下:
//handles updating the game state, moving the objects, and handling collision
这是
<div class="arrow">
i need to hide the overflown text which comes out of the div
</div>
相应的CSS是:
.arrow {
width: 5%;
position: relative;
}
.arrow:before {
content: " ";
width: 0;
position: absolute;
left: -0.58em;
border-style: solid;
border
我的抽气机能给我的气球充气。没问题!但是,当我试图用我的泵(爆裂)气球,它真的不是很好。我可以继续使用我的泵,最终,它将(爆裂)气球,但我的手臂真的很累,我想现在(爆裂)它。所以,取而代之的是,我得到了我的尖尖的棍子和(流行)!当然,我的指点杆在给我的气球充气时甚至不如泵在充气时有效。
Class Balloon
{
Private int _volume = 0;
Private bool _popped = false;
Public Balloon() { }
//Restrict calling to only a PUMP object
I