diff --git a/README.md b/README.md
index f7d498c..1946870 100644
--- a/README.md
+++ b/README.md
@@ -3,3 +3,4 @@
## 舰R小游戏
写的乱七八糟,大神勿喷,QML写的(我居然会用QML写游戏?!)
+BGM是舰R原声
diff --git a/main.qml b/main.qml
index 6169f01..5bbf8fe 100644
--- a/main.qml
+++ b/main.qml
@@ -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
@@ -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"
@@ -141,7 +147,10 @@ ApplicationWindow {
to: 1500
}
}
- onXChanged: myCheck(row_1);
+ onXChanged: {
+ myCheck(row_1);
+ bgm.play()
+ }
}
Image {
id: row_2
diff --git a/qml.qrc b/qml.qrc
index e48d730..0ea7517 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -11,5 +11,6 @@
Data/imge/SG.png
Data/imge/read.png
Data/imge/AL.png
+ Data/2nd_anniversary_c.mp3