if(GetKeyState(VK_SPACE) && Player1.canFire == true)
{
Player1.canFire = false;
Player1.hasFired = true;
Bullet Bullet1((Player1.Xpos + (Player1.Skin->GetWidth() / 2)),
Player1.Ypos - ProjectileSkin->GetHeight() );
}
if(Player1.hasFired = true)
{
Bullet1.Projectile->CopyTo(m_Screen, Bullet1.m_xPos, Bullet1.m_yPos);
Bullet1.m_yPos -= 5;
}
在我说的地方Bullet1.Projectile->CopyTo
,我得到了Bullet1
未定义的错误,但我已经在上面的 if 块中实例化了它。我究竟做错了什么?