tortcard.h
来自「gamecode 很不错的小游戏源代码」· C头文件 代码 · 共 49 行
H
49 行
//***************************************************************
//乌龟卡类
//作者:曾铮
//时间:2004年6月 开始
//说明:在人物的物品链中加入此类的对象。实现物品功能
//***************************************************************
#ifndef tortcard_h_
#define tortcard_h_
#include "MyTool.h"
#include "MyMenus.h"
//#include "CZDemo.h"
extern void GL_GamePicShowSilence();
extern void GL_ToolUse(int toolkind,int playerID);
class tortcard:public MyTool
{
public:
tortcard();
virtual ~tortcard();
public:
virtual bool ToUse();
};
tortcard::tortcard()
{
MyTool::MyTool();
this->kind=TORTCARD;
}
bool tortcard::ToUse()
{
MyMenus usemenu(300,260,"pics/menu.fim",280,120,GetRect(0,0,280,120));
char* choice[]={"使用","取消"};
int select;
GL_GamePicShowSilence();//保存背景图片
select=usemenu.ShowtMenu("是否使用乌龟卡?",choice,2);
if(select==0)
{
GL_GamePicShowSilence();//保存背景图片
Flip();
//播放音乐
//play(一个音乐)
GL_ToolUse(this->kind,this->owner);
return true;
}
return false;
}
tortcard::~tortcard()
{
}
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?