BASEOBJ.H
资源名称:tc3d.zip [点击查看]
上传用户:abcdshs
上传日期:2007-01-07
资源大小:1858k
文件大小:1k
源码类别:
游戏
开发平台:
Visual C++
- // (C) Copyright 1996 by Anthony J. Carin. All Rights Reserved.
- #ifndef BASEOBJ_H
- #define BASEOBJ_H
- #include "3dengine.h"
- #include "command.h"
- #include "queue.h"
- class baseobject : public qentry
- {
- public:
- baseobject(CString& filename);
- virtual ~baseobject();
- virtual void draw();
- virtual void setcolor(COLORREF c) { m_color = c; if (m_body) m_body->setcolor(m_color); }
- virtual void setto(view& v) { m_view = v; }
- virtual void setto(coordinate& v) { m_view = (view)v; if (m_body) m_body->setto(m_view); }
- virtual view& location() { return m_view; }
- virtual void followcommands(command& c) { c = c; }
- virtual void takedamage(short v) { v = v; }
- virtual void setxposition(direction& d) { xposition = d; }
- virtual void setyposition(direction& d) { yposition = d; }
- virtual void setzposition(direction& d) { zposition = d; }
- virtual COLORREF getcolor() { return m_color; }
- char NoBody() { return (char) (m_body == 0); }
- protected:
- void settledown(float y);
- image *m_body;
- view m_view;
- tccolor m_color;
- direction xposition;
- direction yposition;
- direction zposition;
- };
- #endif