Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile-Cn-Ko-En
Commits
5e1e0cb4
Commit
5e1e0cb4
authored
Nov 14, 2019
by
Unicorn369
Committed by
fallenstardust
Dec 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试是否能播放
parent
4ab83905
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+28
-0
No files found.
Classes/gframe/game.cpp
View file @
5e1e0cb4
...
...
@@ -940,6 +940,22 @@ bool Game::Initialize() {
//cancel or finish
btnCancelOrFinish
=
env
->
addButton
(
rect
<
s32
>
(
205
*
xScale
,
220
*
yScale
,
305
*
xScale
,
275
*
yScale
),
0
,
BUTTON_CANCEL_OR_FINISH
,
dataManager
.
GetSysString
(
1295
));
btnCancelOrFinish
->
setVisible
(
false
);
soundManager
=
Utils
::
make_unique
<
SoundManager
>
();
soundManager
->
Init
(
50
,
50
,
true
,
true
,
nullptr
);
//临时设置
/* 建设中......
if(!soundManager->Init(gameConf.soundVolume, gameConf.musicVolume, gameConf.enablesound, gameConf.enablemusic, nullptr)) {
chkEnableSound->setChecked(false);
chkEnableSound->setEnabled(false);
chkEnableSound->setVisible(false);
chkEnableMusic->setChecked(false);
chkEnableMusic->setEnabled(false);
chkEnableMusic->setVisible(false);
scrSoundVolume->setVisible(false);
scrMusicVolume->setVisible(false);
chkMusicMode->setEnabled(false);
chkMusicMode->setVisible(false);
}
*/
#endif
//leave/surrender/exit
btnLeaveGame
=
env
->
addButton
(
rect
<
s32
>
(
205
*
xScale
,
1
*
yScale
,
305
*
xScale
,
80
*
yScale
),
0
,
BUTTON_LEAVE_GAME
,
L""
);
...
...
@@ -1095,6 +1111,16 @@ void Game::MainLoop() {
#endif
gMutex
.
lock
();
if
(
dInfo
.
isStarted
)
{
if
(
dInfo
.
isFinished
&&
showcardcode
==
1
)
soundManager
->
PlayBGM
(
SoundManager
::
BGM
::
WIN
);
else
if
(
dInfo
.
isFinished
&&
(
showcardcode
==
2
||
showcardcode
==
3
))
soundManager
->
PlayBGM
(
SoundManager
::
BGM
::
LOSE
);
else
if
(
dInfo
.
lp
[
0
]
>
0
&&
dInfo
.
lp
[
0
]
<=
dInfo
.
lp
[
1
]
/
2
)
soundManager
->
PlayBGM
(
SoundManager
::
BGM
::
DISADVANTAGE
);
else
if
(
dInfo
.
lp
[
0
]
>
0
&&
dInfo
.
lp
[
0
]
>=
dInfo
.
lp
[
1
]
*
2
)
soundManager
->
PlayBGM
(
SoundManager
::
BGM
::
ADVANTAGE
);
else
soundManager
->
PlayBGM
(
SoundManager
::
BGM
::
DUEL
);
DrawBackImage
(
imageManager
.
tBackGround
);
DrawBackGround
();
DrawCards
();
...
...
@@ -1103,12 +1129,14 @@ void Game::MainLoop() {
driver
->
setMaterial
(
irr
::
video
::
IdentityMaterial
);
driver
->
clearZBuffer
();
}
else
if
(
is_building
)
{
soundManager
->
PlayBGM
(
SoundManager
::
BGM
::
DECK
);
DrawBackImage
(
imageManager
.
tBackGround_deck
);
#ifdef _IRR_ANDROID_PLATFORM_
driver
->
enableMaterial2D
(
true
);
DrawDeckBd
();
driver
->
enableMaterial2D
(
false
);
}
else
{
soundManager
->
PlayBGM
(
SoundManager
::
BGM
::
MENU
);
DrawBackImage
(
imageManager
.
tBackGround_menu
);
}
driver
->
enableMaterial2D
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment