baseobj.h
来自「一个三维打斗游戏」· C头文件 代码 · 共 43 行
H
43 行
// (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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?