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

📄 arrow.h

📁  ?跳舞机的源代码 自己修改一下 编译没有问题
💻 H
字号:
//arrow.h
#include<ddraw.h>
#pragma comment(lib,"ddraw")
extern posx,posy;
extern HWND hWnd;

class ARROW
{
private:
	DWORD time;
	int aposx;
	int aposy;
	bool enable;
	bool move;
	int direction;
public:
	int flag;
	ARROW()
	{
		this->direction=rand()%4;
		this->enable=true;
		this->move=false;
		this->flag=4;
		this->time=timeGetTime();
		switch(direction)
		{
	    case 0:
			{
		    this->aposx=70;
			this->aposy=768;
			}
		    break;
	    case 1:
			{
		    this->aposx=170;
			this->aposy=768;
			}
		    break;
	    case 2:
			{
		    this->aposx=290;
			this->aposy=768;
			}
		    break;
	    case 3:
			{
		    this->aposx=390;
			this->aposy=768;
			}
		    break;
	    default:
		    MessageBox(hWnd,"程序内部出错,请重新开启游戏!", "",MB_OK);
		    break;
		}
	}

    void ArrowMove();//箭头移动
	int  GetPosx(){return aposx;}
	int  GetPosy(){return aposy;}
	bool GetMove(){return move;}
	int  GetDirection(){return direction;}
	void SetMove(bool x){move=x;}
	void SetEnable(bool x){enable=x;}
	void SetDirection(int x){direction=x;}
	void SetPosx(int x){posx=x;}
	void SetPosy(int y){posy=y;}
	void TIME(){time=timeGetTime();}
    //int RandArrow();//随机产生箭头
};

⌨️ 快捷键说明

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