⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 leg.h

📁 一个三维打斗游戏
💻 H
字号:
// (C) Copyright 1996 by Anthony J. Carin.  All Rights Reserved.

#ifndef LEG_H
#define LEG_H

#include "baseobj.h"
#include "attach.h"
#include "personal.h"

class shin;

class leg : public baseobject
{
public:

         leg(personal *p);
        ~leg();
void     setcolor(COLORREF c);
void     draw();
void     setto(view& c);
void     bendknee(float v);

private:

attachment *knee;
shin       *m_shin;

};

class foot;

class shin : public baseobject
{
public:
         shin(personal *p);
        ~shin();
void     setcolor(COLORREF c);
void     draw();
void     setto(view& c);

private:

attachment *ankle;
foot       *m_foot;

};

class foot : public baseobject
{
public:
         foot(personal *p);
        ~foot();

};

class totalleg
{
public:
         totalleg(coordinate& offset, personal *p);
        ~totalleg();
void     setto(view& c)       { legjoint->setto(c); }
void     setcolor(COLORREF c) { m_leg->setcolor(c); }
void     draw()               { legjoint->draw(); }
void     raisefoward(float v);
void     raisebackward(float v);
void     raisesideward(float v);
void     bendknee(float v);

private:
attachment *legjoint;
leg        *m_leg;
};

inline void leg::bendknee(float v)
{
    m_shin->setxposition((direction) (short)(TC_PI*v));
}

inline void totalleg::raisefoward(float v)
{
    m_leg->setxposition((direction) (-TC_PI*v));
}

inline void totalleg::raisebackward(float v)
{
    m_leg->setxposition((direction) (TC_PI*v));
}

inline void totalleg::raisesideward(float v)
{
    m_leg->setzposition((direction) (TC_PI*v));
}

inline void totalleg::bendknee(float v)
{
    m_leg->bendknee(v);
}

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -