• 大小: 3.26MB
    文件类型: .zip
    金币: 2
    下载: 0 次
    发布日期: 2024-01-27
  • 语言: C/C++
  • 标签: QT  飞机大战  C++  

资源简介

这是Qt c++实现的飞机大战小游戏的源代码,QT5可以打开,运行效果:https://blog.csdn.net/qq_37629746/article/details/88193008。

资源截图

代码片段和文件信息

#include “Baozha.h“

Baozha::Baozha()
{

}

Baozha::Baozha(QGraphicsPixmapItem *p)
{
    this->p=p;
}

void Baozha::run()
{
    QPixmap *tu=new QPixmap(QString::fromStdString(“:/images/explosion.BMP“));

    for(int i=1;i<=8;i++)
    {
        QPixmap tu2=tu->copy(tu->width()/8*(i-1)0tu->width()/8tu->height());
        tu2=tu2.scaled(QSize(tu2.width()/2tu2.height()/2) Qt::KeepAspectRatio);
        p->setPixmap(tu2);
        p->update();
        if(i!=8)Sleep(1000);
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-03-05 17:36  feiji3\
     文件         508  2019-03-02 15:06  feiji3\Baozha.cpp
     文件         347  2019-03-02 15:06  feiji3\Baozha.h
     文件         352  2019-03-03 20:18  feiji3\Bullet.cpp
     文件         379  2019-03-03 20:19  feiji3\Bullet.h
     文件       22451  2019-03-04 12:26  feiji3\Control.cpp
     文件        3606  2019-03-04 12:15  feiji3\Control.h
     文件        1211  2019-03-05 17:33  feiji3\feiji3.pro
     文件       23796  2019-03-05 17:36  feiji3\feiji3.pro.user
     目录           0  2019-03-03 19:11  feiji3\images\
     文件      228796  2018-01-22 16:20  feiji3\images\background.png
     文件       23838  2018-01-22 16:20  feiji3\images\boss.png
     文件        3221  2018-01-22 16:20  feiji3\images\bossbullet.png
     文件        3494  2018-01-22 16:20  feiji3\images\enemybullet.png
     文件        9514  2018-01-22 16:20  feiji3\images\enemyplane.png
     文件       34992  2016-01-23 17:32  feiji3\images\explosion.BMP
     文件       95760  2019-03-03 18:59  feiji3\images\explosion.png
     文件       95760  2019-03-03 18:25  feiji3\images\explosion2.BMP
     文件        3291  2018-01-22 16:20  feiji3\images\lifesupply.png
     文件        3833  2018-01-22 16:20  feiji3\images\mybullet.png
     文件       14995  2018-01-22 16:20  feiji3\images\myplane.png
     文件       15232  2018-01-22 16:20  feiji3\images\warofplanes.jpg
     文件        7358  2018-01-22 16:20  feiji3\images\warofplanesicon.ico
     文件      143253  2018-01-22 16:20  feiji3\images\welcome.png
     文件      149998  2018-01-22 16:20  feiji3\images\welcome_new.png
     文件         655  2019-03-03 19:19  feiji3\main.cpp
     目录           0  2019-03-02 11:36  feiji3\music\
     文件       84216  2016-01-23 17:32  feiji3\music\sound1.wav
     文件      316536  2016-01-23 17:32  feiji3\music\sound2.wav
     文件        6124  2016-01-23 17:32  feiji3\music\sound3.wav
     文件     2263869  2018-01-22 16:20  feiji3\music\starwars.mp3
............此处省略7个文件信息

评论

共有 条评论