本文整理汇总了C++中MyRect::MoveDown方法的典型用法代码示例。如果您正苦于以下问题:C++ MyRect::MoveDown方法的具体用法?C++ MyRect::MoveDown怎么用?C++ MyRect::MoveDown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyRect
的用法示例。
在下文中一共展示了MyRect::MoveDown方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessKeyboard
void ProcessKeyboard()
{
if (VK_LEFT == GetPressedKeyboard())
{
myRect.MoveLeft(5);
}
if (VK_RIGHT == GetPressedKeyboard())
{
myRect.MoveRight(5);
}
if (VK_UP == GetPressedKeyboard())
{
myRect.MoveUp(5);
}
if (VK_DOWN == GetPressedKeyboard())
{
myRect.MoveDown(5);
}
if (VK_SPACE == GetPressedKeyboard())
{
//스페이스바를 눌렀을 경우
// 화면 임의의 위치에 새로운 shape를 만들어서 그릴수 있도록 준비해 주세요
}
}
示例2: ProcessKeyboard
void ProcessKeyboard()
{
if (VK_LEFT == GetPressedKeyboard())
{
myRect.MoveLeft(2);
}
if (VK_RIGHT == GetPressedKeyboard())
{
myRect.MoveRight(3);
}
if (VK_UP == GetPressedKeyboard())
{
myRect.MoveUp(2);
}
if (VK_DOWN == GetPressedKeyboard())
{
myRect.MoveDown(4);
}
if (VK_SPACE == GetPressedKeyboard())
{
npcinit(gX, gY, gWidth, gHeight);
gX += 8;
if( gX > 60)
{
gY += 4;
gX = 0;
}
}
if( VK_LBUTTON == GetPressedKeyboard())
{
MyTriangle triangle;
triangle.m_x = 15;
triangle.m_y = 3;
triangle.m_height = 5;
triangles.push_back(triangle);
}
}
示例3: ProcessKeyboard
void ProcessKeyboard()
{
if (VK_LEFT == GetPressedKeyboard())
{
myRect.MoveLeft(5);
}
if (VK_RIGHT == GetPressedKeyboard())
{
myRect.MoveRight(5);
}
if (VK_UP == GetPressedKeyboard())
{
myRect.MoveUp(5);
}
if (VK_DOWN == GetPressedKeyboard())
{
myRect.MoveDown(5);
}
<<<<<<< .mine