location.h
来自「S.C.O.U.R.G.E.是一款类似Rogue的游戏」· C头文件 代码 · 共 63 行
H
63 行
/*************************************************************************** location.h - description ------------------- begin : Mon May 12 2003 copyright : (C) 2003 by Gabor Torok email : cctorok@yahoo.com ***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/#ifndef LOCATION_H#define LOCATION_H#include "shape.h"#include "item.h"#include "creature.h"#include "effect.h"// forward decl.class Creature;class Effect;/** *@author Gabor Torok */class Location {public: // shapes Uint16 x, y, z; Shape *shape; Item *item; Creature *creature;};class EffectLocation {public: Uint16 x, y, z; GLuint effectDuration; GLuint damageEffectCounter; Effect *effect; int effectType; // effects inline void setEffectType(int n) { this->effectType = n; } inline int getEffectType() { return effectType; } inline Effect *getEffect() { return effect; } inline int getDamageEffect() { return damageEffectCounter; } inline void resetDamageEffect() { damageEffectCounter = SDL_GetTicks(); } inline bool isEffectOn() { return (SDL_GetTicks() - damageEffectCounter < effectDuration ? true : false); }};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?