?? explosion.h
字號(hào):
#ifndef __EXPLOSION_H_INCLUDED__
#define __EXPLOSION_H_INCLUDED__
// 包含文件
#include "Particles.h"
// 常量與宏
const CVector PARTICLE_VELOCITY (0.0f, 2.0f, 0.0f);
const CVector VELOCITY_VARIATION (4.0f, 4.0f, 4.0f);
const CVector PARTICLE_ACCELERATION (0.0f, -5.0f, 0.0f);
const float PARTICLE_SIZE = 5.0f;
const float SIZE_VARIATION = 2.0f;
#define FRAND (((float)rand()-(float)rand())/RAND_MAX)
// 數(shù)據(jù)結(jié)構(gòu)
class CExplosion : public CParticleSystem
{
public:
CExplosion(int maxParticles, CVector origin, float spread, GLuint texture);
void Update(float elapsedTime);
void Render();
bool IsDead() { return m_numParticles == 0; }
protected:
void InitializeParticle(int index);
float m_spread;
GLuint m_texture; // 爆炸效果的紋理
};
#endif // __EXPLOSION_H_INCLUDED__
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -