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
62b8e2f5
Commit
62b8e2f5
authored
Aug 03, 2021
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入合成上报
parent
73b5c30f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
11 deletions
+29
-11
MainPanel.cs
Assets/Scripts/Panel/MainPanel.cs
+25
-7
MusicPanel.cs
Assets/Scripts/Panel/MusicPanel.cs
+1
-1
MusicRedBagPanel.cs
Assets/Scripts/Panel/MusicRedBagPanel.cs
+3
-3
No files found.
Assets/Scripts/Panel/MainPanel.cs
View file @
62b8e2f5
...
...
@@ -6,18 +6,18 @@ using UnityEngine.UI;
public
class
MainPanel
:
BasePanel
{
<<<<<<<
HEAD
protected
override
void
Awake
()
{
base
.
Awake
();
EventCenter
.
Getinstance
().
AddUpdateListener
(
"RegisterPanel"
,
()
=>
{
UIMgr
.
Getinstance
().
RegisterPanel
<
MainPanel
>(
this
);
});
EventCenter
.
Getinstance
().
AddUpdateListener
(
"RegisterPanel"
,
()
=>
{
UIMgr
.
Getinstance
().
RegisterPanel
<
MainPanel
>(
this
);
});
}
=======
private
string
currentSongId
=
"0"
;
private
int
nextSongId
=
0
;
private
List
<
string
>
notesList
=
null
;
private
int
playNoteIndex
=
0
;
private
bool
IsSuccess
=
false
;
>>>>>>>
0f
a10fd520ad3cd02f948768758850a333bc8c2c
public
override
void
OnHide
(
object
data
=
null
)
{
...
...
@@ -64,9 +64,10 @@ public class MainPanel : BasePanel
if
(
playNoteIndex
==
notesList
.
Count
)
{
GetNoteCompleted
();
IsSuccess
=
true
;
Debug
.
unityLogger
.
Log
(
"合成音符红包"
);
UIMgr
.
Getinstance
().
ShowPanel
<
MusicRedBagPanel
>(
E_Layer
.
mid
);
//
UIMgr.Getinstance().ShowPanel<MusicRedBagPanel>(E_Layer.mid);
}
GetControl
<
Text
>(
"ProgressTv"
).
text
=
playNoteIndex
+
"/"
+
notesList
.
Count
;
...
...
@@ -99,6 +100,8 @@ public class MainPanel : BasePanel
paras
.
Add
(
"song_id"
,
song_id
);
HttpTool
.
Instance
.
_Get2
(
"app/v1/watermelon/notes"
,
paras
,
new
Action
<
Response
<
List
<
string
>>>((
result
)
=>
{
currentSongId
=
result
.
result
.
song_id
;
nextSongId
=
result
.
result
.
next_song_id
;
IsSuccess
=
false
;
playNoteIndex
=
0
;
notesList
=
result
.
result
.
data
;
...
...
@@ -109,7 +112,22 @@ public class MainPanel : BasePanel
{
Debug
.
unityLogger
.
Log
(
"获取下一组生成的球 "
+
code
+
" msg "
+
msg
);
}));
}
/// <summary>
/// 合成歌曲上报
/// </summary>
/// <param name="song_id"></param>
public
void
GetNoteCompleted
()
{
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
paras
.
Add
(
"song_id"
,
currentSongId
);
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/Panel/MusicPanel.cs
View file @
62b8e2f5
...
...
@@ -18,7 +18,7 @@ public class MusicPanel : BasePanel
#
region
通过数据初始化面板
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
paras
.
Add
(
"song_id"
,
0
);
paras
.
Add
(
"song_id"
,
1
);
HttpTool
.
Instance
.
_Get
(
"app/v1/watermelon/songs_list"
,
paras
,
new
Action
<
SongBean
>((
result
)
=>
{
print
(
result
);
...
...
Assets/Scripts/Panel/MusicRedBagPanel.cs
View file @
62b8e2f5
...
...
@@ -6,16 +6,16 @@ public class MusicRedBagPanel : BasePanel
{
public
override
void
OnHide
(
object
data
=
null
)
{
throw
new
System
.
NotImplementedException
();
//
throw new System.NotImplementedException();
}
public
override
void
OnInit
(
object
data
=
null
)
{
throw
new
System
.
NotImplementedException
();
//
throw new System.NotImplementedException();
}
public
override
void
OnRefresh
(
object
data
=
null
)
{
throw
new
System
.
NotImplementedException
();
//
throw new System.NotImplementedException();
}
}
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