예제 #1
0
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
0
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
0
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