WEAPON.H
资源名称:tc3d.zip [点击查看]
上传用户:abcdshs
上传日期:2007-01-07
资源大小:1858k
文件大小:1k
源码类别:
游戏
开发平台:
Visual C++
- // (C) Copyright 1996 by Anthony J. Carin. All Rights Reserved.
- #ifndef WEAPON_H
- #define WEAPON_H
- #include "landscpe.h"
- #include "weaphold.h"
- class handheld : public landscape
- {
- public:
- handheld() : landscape((CString) "") { m_type = HANDHELD; }
- char IsAKnife() { return (char) (m_hhtype == KNIFE); }
- char IsASword() { return (char) (m_hhtype == SWORD); }
- char IsAShield() { return (char) (m_hhtype == SHIELD); }
- short NumType() { return (short) m_hhtype; }
- void draw();
- protected:
- WeaponType m_hhtype;
- char hitfloor;
- char pickingup;
- view m_prevview;
- };
- class weapon : public handheld
- {
- public:
- weapon(CString& weapondat);
- void draw();
- void Throw(direction& dir, float speed);
- private:
- char throwing;
- direction throwdir;
- float throwspeed;
- direction flipdir;
- };
- #endif