91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 6.87MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-10-11
  • 語言: 其他
  • 標簽: QT??c++??

資源簡介

是一款比較簡單的捕魚達人小游戲,功能還沒做全,實現了基本的捕魚功能,可供新手學習,共享資源,希望有所幫助,有問題的可以私信。

資源截圖

代碼片段和文件信息

#include?“easyview.h“


easyview::easyview()
{
????this->resize(800533);//設置窗口-大小
????this->setWindowtitle(“捕魚達人“);//標題
????this->setWindowIcon(QIcon(“image/fish2.png“));//窗口的圖標
????this->setAutoFillBackground(true);//新的界面可以填充舊的界面

????this->setBackgroundBrush(QBrush(QPixmap(“image/seaworld1.png“)));

????this->setMouseTracking(true);//鼠標移動事件打開
//申請空間
????this->easyscene=new?QGraphicsScene;
????this->easyscene->setSceneRect(00this->width()-4this->height()-4);
????this->setScene(easyscene);

????//大炮
????this->gun=new?gun_item(“image/pao5.png“easyscene);
????gun->setPos(this->width()/2this->height());
???//?scene->addItem(gun);

????//魚
????this->fish1=new?Qfish(“image/shark_r1.png“easyscene);
?//???fish1->setPos(-3050);


????this->fish2=new?Qfish(“image/shark_r2.png“easyscene);
??//??fish2->setPos(-120150);


????this->fish3=new?Qfish(“image/shark_r3.png“easyscene);
??//??fish3->setPos(-50250);


????this->fish4=new?Qfish(“image/shark_r4.png“easyscene);
??//??fish1->setPos(-20350);


????//定時器

????timer=new?QTimer;
????connect(timerSIGNAL(timeout())this->easysceneSLOT(advance()));
????timer->start(400);


}
void?easyview::resizeEvent(QResizeEvent?*event)
{
??????this->setBackgroundBrush(QBrush(QPixmap(“image/seaworld1.png“).scaled(event->size())));
//用戶拖動窗口的同時?也能改變背景圖片的大小,繪制圖片里面有個縮放函數,它的參數需要新窗口的大小?,而事件event里面存放著新窗口的大小,頭文件要包。

}
void?easyview::mouseMoveEvent(QMouseEvent?*event)
{


????QPoint?p;
????p=event->pos();//定義一個點,讓這個點的位置是當前鼠標所在的位置。


????QLine?line(this->width()/2this->height()p.x()p.y());

????QLineF?linef(line);
????this->gun->setRotation(-(linef.angle()-90));



}

?void?easyview::mousePressEvent(QMouseEvent?*event)//對鼠標點擊事件進行重載
?{

?????QPoint?p;
?????p=event->pos();

?????QLine??line(this->width()/2this->height()p.x()p.y());
?????QLineF??linef(line);


?????qbullet?*bullet=new?qbullet(“image/B5.png“easyscenelinef.angle());//后面那個參數是為了把bullet給additem到easyscene







?}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????345597??2020-03-21?16:50??fish\debug\easyview.o

?????文件????8975716??2020-03-21?16:51??fish\debug\fish.exe

?????文件?????347051??2020-03-21?16:50??fish\debug\fish_main_widget.o

?????文件?????338317??2020-03-21?16:50??fish\debug\gameset_widget.o

?????文件?????169900??2020-03-21?16:50??fish\debug\gun_item.o

?????文件?????227292??2020-02-12?17:44??fish\debug\help.o

?????文件?????398653??2020-03-21?16:50??fish\debug\login_widget.o

?????文件?????264644??2020-03-21?16:50??fish\debug\main.o

?????文件???????2788??2020-03-21?16:50??fish\debug\moc_fish_main_widget.cpp

?????文件?????263032??2020-03-21?16:50??fish\debug\moc_fish_main_widget.o

?????文件???????2758??2020-03-21?16:50??fish\debug\moc_gameset_widget.cpp

?????文件?????262577??2020-03-21?16:51??fish\debug\moc_gameset_widget.o

?????文件???????2315??2020-02-12?17:43??fish\debug\moc_help.cpp

?????文件?????127680??2020-02-12?17:43??fish\debug\moc_help.o

?????文件???????2627??2020-03-21?16:51??fish\debug\moc_login_widget.cpp

?????文件?????296786??2020-03-21?16:51??fish\debug\moc_login_widget.o

?????文件???????2447??2020-02-12?16:55??fish\debug\moc_setting.cpp

?????文件?????202804??2020-02-12?16:55??fish\debug\moc_setting.o

?????文件???????2551??2020-03-21?16:51??fish\debug\moc_signin_widget.cpp

?????文件?????285981??2020-03-21?16:51??fish\debug\moc_signin_widget.o

?????文件?????408948??2020-03-21?16:50??fish\debug\qbullet.o

?????文件?????395269??2020-03-21?16:50??fish\debug\qfish.o

?????文件?????197742??2020-03-21?16:50??fish\debug\qnet.o

?????文件?????303630??2020-03-21?16:50??fish\debug\qpixmapitem.o

?????文件?????283322??2020-02-12?17:09??fish\debug\setting.o

?????文件?????352307??2020-03-21?16:50??fish\debug\signin_widget.o

?????文件?????105654??2020-02-21?19:54??fish\debug\user.o

?????文件?????260674??2020-02-26?19:31??fish\debug\user_database.o

?????文件???????2193??2020-02-02?20:06??fish\easyview.cpp

?????文件????????927??2020-02-02?19:08??fish\easyview.h

............此處省略75個文件信息

評論

共有 條評論