Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
M
MusicBigWatermelon
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
MusicBigWatermelon
Commits
b76fb8ab
Commit
b76fb8ab
authored
Aug 02, 2021
by
LiLiuZhou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.huolea.com:wangxuewei/musicbigwatermelon
parents
fb7e49e5
83d24a6b
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
151 additions
and
10 deletions
+151
-10
AudioManager.cs
Assets/Scripts/Controllers/AudioManager.cs
+10
-7
AudioManager.cs.meta
Assets/Scripts/Controllers/AudioManager.cs.meta
+0
-0
GameController.cs
Assets/Scripts/Controllers/GameController.cs
+19
-3
HomeInfoControl.cs
Assets/Scripts/Main/HomeInfoControl.cs
+4
-0
SongBean.cs
Assets/Scripts/Model/SongBean.cs
+30
-0
SongBean.cs.meta
Assets/Scripts/Model/SongBean.cs.meta
+11
-0
WithDrawBean.cs
Assets/Scripts/Model/WithDrawBean.cs
+66
-0
WithDrawBean.cs.meta
Assets/Scripts/Model/WithDrawBean.cs.meta
+11
-0
No files found.
Assets/Scripts/
Main
/AudioManager.cs
→
Assets/Scripts/
Controllers
/AudioManager.cs
View file @
b76fb8ab
...
@@ -2,20 +2,23 @@
...
@@ -2,20 +2,23 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
public
class
AudioManager
:
MonoB
ehaviour
public
class
AudioManager
:
MonoB
aseMgr
<
AudioManager
>
{
{
private
GameObject
PlayMusic
;
private
AudioSource
mAudiSource
;
private
AudioSource
mAudiSource
;
public
static
AudioManager
Instance
;
private
void
Awake
()
private
void
Awake
()
{
{
Instance
=
this
;
mAudiSource
=
PlayMusic
.
AddComponent
<
AudioSource
>();
mAudiSource
=
GetComponent
<
AudioSource
>();
}
}
public
IEnumerator
LoadAudio
(
string
recordPath
)
public
void
PlayAudio
(
string
MusicUrl
)
{
StartCoroutine
(
LoadAudio
(
MusicUrl
));
}
private
IEnumerator
LoadAudio
(
string
MusicUrl
)
{
{
// www 加载音频
// www 加载音频
WWW
www
=
new
WWW
(
recordPath
);
WWW
www
=
new
WWW
(
MusicUrl
);
yield
return
www
;
yield
return
www
;
var
clipTemp
=
www
.
GetAudioClip
();
var
clipTemp
=
www
.
GetAudioClip
();
mAudiSource
.
clip
=
clipTemp
;
mAudiSource
.
clip
=
clipTemp
;
...
@@ -25,7 +28,7 @@ public class AudioManager : MonoBehaviour
...
@@ -25,7 +28,7 @@ public class AudioManager : MonoBehaviour
}
}
private
void
Update
()
private
void
Update
()
{
{
Debug
.
unityLogger
.
Log
(
"是否暂停"
+
mAudiSource
.
isPlaying
);
//
Debug.unityLogger.Log("是否暂停"+ mAudiSource.isPlaying);
}
}
public
void
StopPlay
()
public
void
StopPlay
()
{
{
...
...
Assets/Scripts/
Main
/AudioManager.cs.meta
→
Assets/Scripts/
Controllers
/AudioManager.cs.meta
View file @
b76fb8ab
File moved
Assets/Scripts/Controllers/GameController.cs
View file @
b76fb8ab
...
@@ -49,7 +49,7 @@ public class GameController : MonoBehaviour
...
@@ -49,7 +49,7 @@ public class GameController : MonoBehaviour
{
{
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
paras
.
Add
(
"type"
,
type
);
paras
.
Add
(
"type"
,
type
);
HttpTool
.
Instance
.
_Get
(
"app/v1/watermelon/list_wd"
,
paras
,
new
Action
<
Empty
Bean
>((
result
)
=>
HttpTool
.
Instance
.
_Get
(
"app/v1/watermelon/list_wd"
,
paras
,
new
Action
<
WithDraw
Bean
>((
result
)
=>
{
{
}),
new
Action
<
string
,
string
>((
code
,
msg
)
=>
}),
new
Action
<
string
,
string
>((
code
,
msg
)
=>
...
@@ -66,7 +66,7 @@ public class GameController : MonoBehaviour
...
@@ -66,7 +66,7 @@ public class GameController : MonoBehaviour
{
{
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
paras
.
Add
(
"song_id"
,
song_id
);
paras
.
Add
(
"song_id"
,
song_id
);
HttpTool
.
Instance
.
_Get
(
"app/v1/watermelon/songs_list"
,
paras
,
new
Action
<
Empty
Bean
>((
result
)
=>
HttpTool
.
Instance
.
_Get
(
"app/v1/watermelon/songs_list"
,
paras
,
new
Action
<
Song
Bean
>((
result
)
=>
{
{
}),
new
Action
<
string
,
string
>((
code
,
msg
)
=>
}),
new
Action
<
string
,
string
>((
code
,
msg
)
=>
...
@@ -75,6 +75,22 @@ public class GameController : MonoBehaviour
...
@@ -75,6 +75,22 @@ public class GameController : MonoBehaviour
}));
}));
}
}
/// <summary>
/// 合成歌曲上报
/// </summary>
public
void
GetNoteCompleted
(
int
song_id
)
{
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
paras
.
Add
(
"song_id"
,
song_id
);
HttpTool
.
Instance
.
_Get
(
"app/v1/watermelon/note_completed"
,
paras
,
new
Action
<
EmptyBean
>((
result
)
=>
{
}),
new
Action
<
string
,
string
>((
code
,
msg
)
=>
{
Debug
.
unityLogger
.
Log
(
"合成歌曲上报 "
+
code
+
" msg "
+
msg
);
}));
}
}
}
Assets/Scripts/Main/HomeInfoControl.cs
View file @
b76fb8ab
...
@@ -28,9 +28,13 @@ public class HomeInfoControl : MonoBehaviour
...
@@ -28,9 +28,13 @@ public class HomeInfoControl : MonoBehaviour
//GetHomeInfo();
//GetHomeInfo();
//获取下一组要生成的水果的音符
//获取下一组要生成的水果的音符
//GameController.GetInstance().GetNextNoteList(0);
//GameController.GetInstance().GetNextNoteList(0);
//
UIMgr
.
Getinstance
().
ShowPanel
<
MainPanel
>(
E_Layer
.
mid
);
UIMgr
.
Getinstance
().
ShowPanel
<
MainPanel
>(
E_Layer
.
mid
);
UIMgr
.
Getinstance
().
ShowPanel
<
TouchPanel
>(
E_Layer
.
bot
);
UIMgr
.
Getinstance
().
ShowPanel
<
TouchPanel
>(
E_Layer
.
bot
);
GameController
.
GetInstance
().
GetSongsList
(
0
);
GameController
.
GetInstance
().
GetWithdrawList
(
1
);
}
}
...
...
Assets/Scripts/Model/SongBean.cs
0 → 100644
View file @
b76fb8ab
using
System
;
using
System.Collections.Generic
;
[Serializable]
public
class
SongBean
{
public
List
<
SongItemBean
>
list
{
get
;
set
;
}
}
[Serializable]
public
class
SongItemBean
{
/// <summary>
/// 歌曲id
/// </summary>
public
int
song_id
{
get
;
set
;
}
/// <summary>
/// 歌曲名称
/// </summary>
public
string
song_name
{
get
;
set
;
}
/// <summary>
/// 歌曲封面url地址
/// </summary>
public
string
song_cover
{
get
;
set
;
}
/// <summary>
/// 歌曲播放url地址
/// </summary>
public
string
song_play
{
get
;
set
;
}
}
Assets/Scripts/Model/SongBean.cs.meta
0 → 100644
View file @
b76fb8ab
fileFormatVersion: 2
guid: 58243d454dd78024ab8f6e281b70a2ea
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Model/WithDrawBean.cs
0 → 100644
View file @
b76fb8ab
using
System
;
using
System.Collections.Generic
;
[Serializable]
public
class
WithDrawBean
{
/// <summary>
/// 用户当前合成的西瓜数
/// </summary>
public
int
userCount
{
get
;
set
;
}
public
List
<
WithDrawItemBean
>
list
{
get
;
set
;
}
}
[Serializable]
public
class
WithDrawItemBean
{
/// <summary>
/// 提现id
/// </summary>
public
int
id
{
get
;
set
;
}
/// <summary>
/// 金额单位(app显示用)
/// </summary>
public
string
unit
{
get
;
set
;
}
/// <summary>
/// 提现描述
/// </summary>
public
string
desc
{
get
;
set
;
}
/// <summary>
/// 提现金额(app显示用)
/// </summary>
public
string
cashStr
{
get
;
set
;
}
/// <summary>
/// 提现类型(1 合成提现,2 签到类提现,3大额提现)
/// </summary>
public
int
type
{
get
;
set
;
}
/// <summary>
/// 提现角标
/// </summary>
public
string
text
{
get
;
set
;
}
/// <summary>
/// 提现达到要求需要的数量
/// </summary>
public
int
targetNum
{
get
;
set
;
}
/// <summary>
/// 提现到账数值(分)
/// </summary>
public
int
cash
{
get
;
set
;
}
/// <summary>
/// 提现状态(0 不可提现,1可提现,2已经提过现)
/// </summary>
public
int
status
{
get
;
set
;
}
/// <summary>
/// 当前已完成数量
/// </summary>
public
int
completeNum
{
get
;
set
;
}
/// <summary>
/// 包名
/// </summary>
public
string
pkg
{
get
;
set
;
}
/// <summary>
/// 不可提现的描述
/// </summary>
public
string
tip
{
get
;
set
;
}
}
Assets/Scripts/Model/WithDrawBean.cs.meta
0 → 100644
View file @
b76fb8ab
fileFormatVersion: 2
guid: 9cb6b49ed36691242bc124d4d59f0108
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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