Skip to content

Commit

Permalink
添加了舰R的BGM
Browse files Browse the repository at this point in the history
  • Loading branch information
Fydui committed Feb 4, 2017
1 parent 173b90b commit 9f25528
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
## 舰R小游戏

写的乱七八糟,大神勿喷,QML写的(我居然会用QML写游戏?!)
BGM是舰R原声
11 changes: 10 additions & 1 deletion main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
import my.Gevent 1.0
import QtMultimedia 5.5

ApplicationWindow {
visible: true
Expand All @@ -15,6 +16,11 @@ ApplicationWindow {
minimumHeight: 540;
minimumWidth: 960;

Audio {
id:bgm
source: "///Data/2nd_anniversary_c.mp3"
}

Image {
id: bg_sea_static//静态背景
source: "///Data/imge/BG_sea.png"
Expand Down Expand Up @@ -141,7 +147,10 @@ ApplicationWindow {
to: 1500
}
}
onXChanged: myCheck(row_1);
onXChanged: {
myCheck(row_1);
bgm.play()
}
}
Image {
id: row_2
Expand Down
1 change: 1 addition & 0 deletions qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<file>Data/imge/SG.png</file>
<file>Data/imge/read.png</file>
<file>Data/imge/AL.png</file>
<file>Data/2nd_anniversary_c.mp3</file>
</qresource>
</RCC>

0 comments on commit 9f25528

Please sign in to comment.