?? event.h
字號:
/*--------------------------------------------------------------------------
Event.h header file
----------------------------------------------------------------------------*/
//這個文件定義了存放具體事件信息的結(jié)構(gòu)
#ifndef _Include_Event
#define _Include_Event
///////////////////////////////////////////////////////////////////////
struct ScannedRobotEvent
{
long time;
//被掃描到的機(jī)器人的名字
const char * name;
//被掃描到的機(jī)器人的坐標(biāo)
double x,y;
//被掃描到的機(jī)器人的方向
double heading;
//被掃描到的機(jī)器人的速度
double velocity;
//被掃描到的機(jī)器人的能量
double energy;
};
///////////////////////////////////////////////////////////////////////
struct BulletHitEvent
{
long time;
//擊中敵人的炮彈的能量
double power;
//中彈敵人的X坐標(biāo)
double x;
//中彈敵人的Y坐標(biāo)
double y;
//中彈敵人的名字
const char * name;
};
/////////////////////////////////////////////////////////////////////////
struct HitByBulletEvent
{
long time;
//命中的子彈的能量
double power;
//發(fā)出這顆子彈的機(jī)器人的名字
const char * name;
};
//////////////////////////////////////////////////////////////////////
struct HitRobotEvent
{
long time;
//相撞的機(jī)器人的X坐標(biāo)
double x;
//相撞的機(jī)器人的Y坐標(biāo)
double y;
//相撞的機(jī)器人的名字
const char * name;
};
////////////////////////////////////////////////////////////////////////
struct RobotDeathEvent
{
long time;
const char* name;
};
/////////////////////////////////////////////////////////////////////////
struct HitWallEvent
{
long time;
};
struct BeginEvent
{
long time;
};
struct FinishEvent
{
long time;
};
struct OvertimeEvent
{
long time;
};
/////////////////////////////////////////////////////////////////////////
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -