⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bullets.h

📁 Embedded VC “是男人就挺过二十秒”源代码
💻 H
字号:
// Bullets.h: interface for the CBullets class.
//
/**///////////////////////////////////////////////////////////////////////

#ifndef BULLETS_H
#define BULLETS_H

class CBullets  
{
public:
    BOOL CheckCollision(const RECT rcArea);
    void Destroy();
    void Move();
    void Draw(HDC hdc);
    BOOL Initialize(int iCount,int iMaxMoveDistance,const RECT *prcWnd);
    CBullets();
    virtual ~CBullets();

protected:
    double AverageRandom(double min,double max);
    int m_iCount;
    RECT m_rcWnd;
    int m_iMaxMoveDistance;
    CRITICAL_SECTION m_csBulletData; //The Move() and the CheckCollision() could not be call in the same time

    typedef struct
    {
        LONG x;
        LONG y;
        int iMoveDistX;
        int iMoveDistY;
    }BULLETDATA,*LPBULLETDATA;
    LPBULLETDATA lpBullet; //Pointer to the bullet
    void InitializeBullet(LPBULLETDATA lpBullet);
};

#endif // #ifndef BULLETS_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -