📄 gameobjectparticle.h
字号:
// ***************************************************************
// GameObjectParticle version: 1.0
// -------------------------------------------------------------
// File Name: GameObjectParticle.h
// Created: 2007/07/19
// Modified: 2007/07/19 12:13
// Author: Ben
// Msn: bwenpig@gmail.com
// Email: bwenpig@gmail.com
// Description:
//
// Purpose:
// -------------------------------------------------------------
// license:
//
// The contents of this file are subject to the Mozilla Public
// License Version 1.1 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy
// of the License at http://www.mozilla.org/MPL/ Software dis-
// tributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or im-
// plied. See the License for the specific language governing
// rights and limitations under the License.
//
// The Initial Developer of the Original Code is Ben .
// Copyright (C) 2007 - All Rights Reserved.
// ***************************************************************
#pragma once
#include "objectcom.h"
#include "GameObject.h"
class OBJECT_COM_CLASS CGameObjectParticle :
public IGameObjectParticle , public CGameObject
{
private:
hgeSprite* m_hgeSprite; // 精灵类指针
hgeParticleSystem* m_hgeParticle; // 粒子指针
hgeParticleSystemInfo* m_hgePsi; // 粒子属性结构体
DWORD m_Type; // 系统默认的粒子类型
public:
CGameObjectParticle(void);
virtual ~CGameObjectParticle(void);
//公共相关方法
public:
//对象创建(一张纹理一个粒子)
virtual bool __cdecl Create(LPCTSTR lpName,_SIZE siSize,CResource* pResource,_CString szPsiFileName);
//对象创建(一张纹理多个粒子)
virtual bool __cdecl Create(LPCTSTR lpName,_SIZE siSize,CResource* pResource,DWORD dwType,_CString szPsiFileName);
//渲染对象
virtual void __cdecl Render(WPARAM wParam=NULL);
public:
//粒子在指定点开始
virtual void __cdecl FireAt(_POINT poiFirePoint);
//粒子开始
virtual void __cdecl Fire();
//停止粒子
virtual void __cdecl Stop();
//返回粒子生命
virtual int __cdecl GetAge();
//返回粒子数目
virtual int __cdecl GetParticlesAlive();
//返回粒子属性
virtual hgeParticleSystemInfo* __cdecl GetParticleInfo();
//模板方法
public:
//是否有效
virtual bool __cdecl IsValid() { return AfxIsValidAddress(this,sizeof(CGameObjectParticle))?true:false;};
//释放对象
virtual bool __cdecl Release() { if (IsValid()) delete this; return true; };
//接口查询
virtual void * __cdecl QueryInterface(const IID & Guid, DWORD dwQueryVer);
public:
//操作重载
CGameObjectParticle& operator=(CGameObjectParticle& GamoObject);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -