Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ShootPlane.cpp
Package: LwGame2.0.rar [view]
Upload User: semy2100
Upload Date: 2013-01-22
Package Size: 3633k
Code Size: 2k
Category:
Shot Game
Development Platform:
Visual C++
- /********************************************************************
- * 空运爆发 *
- * Version 2.0 *
- * 本游戏全部代码由: *
- * 冲天实验室 梁锋 编写 *
- * 邮箱:lenwine@126.com *
- * bbs: http://free2.e-168.cn/lenwind (正在开发中...) *
- **********************************************************************/
- #include "stdafx.h"
- int ShootPlane::i=0;
- ShootPlane::ShootPlane(Manager *mgr,int xv,int yv):MemberStatus(mgr,xv,yv)
- {
- EndShoot=0;
- blow_up_value=8*4;
- blow_up_current=-1;
- }
- void ShootPlane::Update()
- {
- MemberStatus::Update();
- if(Shooting)
- Shoot();
- if(alive<=0)//这里是爆炸贞
- {
- if(++blow_up_current==0)
- {
- x+=Bitlong/2-82;
- y+=Bittall/2-73;
- Bitlong=180;
- Bittall=135;
- spx=0;
- spy=0;
- bx=0;
- by=115;
- Shooting=false;
- }
- else if(blow_up_current==blow_up_value)
- Work=false;
- else
- {
- bx=180*(blow_up_current/4%4);
- by=115+135*(blow_up_current/4/4);
- }
- }
- }
- void ShootPlane::Update2()
- {
- MemberStatus::Update2();
- if(Shooting)
- Shoot();
- if(alive2<=0)//这里是爆炸贞
- {
- if(++blow_up_current==0)
- {
- x+=Bitlong/2-82;
- y+=Bittall/2-73;
- Bitlong=180;
- Bittall=135;
- spx=0;
- spy=0;
- bx=0;
- by=115;
- Shooting=false;
- }
- else if(blow_up_current==blow_up_value)
- Work=false;
- else
- {
- bx=180*(blow_up_current/4%4);
- by=115+135*(blow_up_current/4/4);
- }
- }
- }
- void ShootPlane::beginShoot()
- {
- Shooting=true;
- }
- void ShootPlane::stopShoot()
- {
- Shooting=false;
- }
- void ShootPlane::SetEndShoot()
- {
- EndShoot=mManager->Time-rand()%Bomb::GetShoot(bombStyle);
- }
- ShootPlane::~ShootPlane()
- {
- }