- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
LaserGun.cpp
资源名称:g.rar [点击查看]
上传用户:laitongbao
上传日期:2021-02-20
资源大小:8176k
文件大小:1k
源码类别:
射击游戏
开发平台:
Visual C++
- // LaserGun.cpp: implementation of the LaserGun class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "LaserGun.h"
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- LaserGun::LaserGun(NodeObject* owner,float xoffset)
- {
- this->emit = (Particle_Emit*)g_tree->AddObject( &Particle_Emit("LaserGun",4.f,20.f,"bullet\Bullet2.bmp",
- 0xffffffff,0xffffffff,VECTOR3(xoffset,0.f,0.f),0.02f),owner);
- this->damage = 10;
- }
- void LaserGun::Fire(VECTOR3 v0)
- {
- emit->Emit(v0.Normalize()*15.f);
- }
- LaserGun::~LaserGun()
- {
- if(emit)
- g_tree->DeleteObject(emit);
- }