HGE引擎学习笔记1 : 如何模拟物理碰撞(二)

2014-11-24 00:40:22 · 作者: · 浏览: 106
if (y > rect.bottom - nRadius) { y = rect.bottom - nRadius - (y - (rect.bottom - nRadius)); dy = -dy; }
if (y < nRadius) {y = nRadius + nRadius - y; dy = -dy; }
InvalidateRect(hwnd, &rect, TRUE);

break;

case WM_DESTROY:
KillTimer(hwnd, 1);
DeleteObject(hBrush);
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hwnd, message, wParam, lParam);
}

HGE示例源码及Win32SDK源码及可运行程序下载地址:http://up.2cto.com/2012/0213/20120213111636377.rar


摘自 活该你挨踢