old_motion.h
来自「c++程序」· C头文件 代码 · 共 41 行
H
41 行
// Motion.h: Schnittstelle f黵 die Klasse CMotion.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MOTION_H__19897502_A3B2_11D1_8F4C_A07973C10800__INCLUDED_)
#define AFX_MOTION_H__19897502_A3B2_11D1_8F4C_A07973C10800__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Camera.h"
#include "Force.h"
#define MAX_FORCE 50
class CMotion : public CCamera
{
public:
void Jump();
void SetCustomMotion(float fForwardSpeed, float fBackwardSpeed, float fLeftSpeed, float fRightSpeed,
float fUpSpeed, float fDownSpeed);
void SetDefaultMotion(bool bForward, bool bBackward, bool bLeft, bool bRight,
bool bUp, bool bDown);
void ApplyMotionPhysics(DWORD dwTimeElapsed);
CMotion();
virtual ~CMotion();
private:
bool AddMotionVector(CForce cNewMotion);
// Motion behavior
CForce m_Gravity;
float m_SmallestForce;
float m_SlowDown;
// Is camera in the air ?
bool m_MidAir;
// Forces that apply on the camera
CForce m_ForceArray[MAX_FORCE];
};
#endif // !defined(AFX_MOTION_H__19897502_A3B2_11D1_8F4C_A07973C10800__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?