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
93f53a69
Commit
93f53a69
authored
Aug 02, 2021
by
LiLiuZhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
b76fb8ab
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
21 deletions
+67
-21
MainPanel.prefab
Assets/Resources/UI/Panel/MainPanel.prefab
+44
-0
GameController.cs
Assets/Scripts/Controllers/GameController.cs
+0
-18
HomeInfoControl.cs
Assets/Scripts/Main/HomeInfoControl.cs
+1
-1
MainPanel.cs
Assets/Scripts/Panel/MainPanel.cs
+1
-0
MusicPanel.cs
Assets/Scripts/Panel/MusicPanel.cs
+21
-2
No files found.
Assets/Resources/UI/Panel/MainPanel.prefab
View file @
93f53a69
...
...
@@ -513,6 +513,7 @@ GameObject:
-
component
:
{
fileID
:
6808044341889333407
}
-
component
:
{
fileID
:
6808044341889333401
}
-
component
:
{
fileID
:
6808044341889333406
}
-
component
:
{
fileID
:
5315948635498579691
}
m_Layer
:
5
m_Name
:
MyMusic
m_TagString
:
Untagged
...
...
@@ -576,6 +577,49 @@ MonoBehaviour:
m_FillOrigin
:
0
m_UseSpriteMesh
:
0
m_PixelsPerUnitMultiplier
:
1
---
!u!114
&5315948635498579691
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6808044341889333404
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
4e29b1a8efbd4b44bb3f3716e73f07ff
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Navigation
:
m_Mode
:
3
m_SelectOnUp
:
{
fileID
:
0
}
m_SelectOnDown
:
{
fileID
:
0
}
m_SelectOnLeft
:
{
fileID
:
0
}
m_SelectOnRight
:
{
fileID
:
0
}
m_Transition
:
1
m_Colors
:
m_NormalColor
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_HighlightedColor
:
{
r
:
0.9607843
,
g
:
0.9607843
,
b
:
0.9607843
,
a
:
1
}
m_PressedColor
:
{
r
:
0.78431374
,
g
:
0.78431374
,
b
:
0.78431374
,
a
:
1
}
m_SelectedColor
:
{
r
:
0.9607843
,
g
:
0.9607843
,
b
:
0.9607843
,
a
:
1
}
m_DisabledColor
:
{
r
:
0.78431374
,
g
:
0.78431374
,
b
:
0.78431374
,
a
:
0.5019608
}
m_ColorMultiplier
:
1
m_FadeDuration
:
0.1
m_SpriteState
:
m_HighlightedSprite
:
{
fileID
:
0
}
m_PressedSprite
:
{
fileID
:
0
}
m_SelectedSprite
:
{
fileID
:
0
}
m_DisabledSprite
:
{
fileID
:
0
}
m_AnimationTriggers
:
m_NormalTrigger
:
Normal
m_HighlightedTrigger
:
Highlighted
m_PressedTrigger
:
Pressed
m_SelectedTrigger
:
Selected
m_DisabledTrigger
:
Disabled
m_Interactable
:
1
m_TargetGraphic
:
{
fileID
:
6808044341889333406
}
m_OnClick
:
m_PersistentCalls
:
m_Calls
:
[]
---
!u!1
&6808044342050861523
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/Scripts/Controllers/GameController.cs
View file @
93f53a69
...
...
@@ -59,25 +59,7 @@ public class GameController : MonoBehaviour
}
/// <summary>
/// 获取歌曲列表
/// </summary>
public
void
GetSongsList
(
int
song_id
)
{
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
paras
.
Add
(
"song_id"
,
song_id
);
HttpTool
.
Instance
.
_Get
(
"app/v1/watermelon/songs_list"
,
paras
,
new
Action
<
SongBean
>((
result
)
=>
{
}),
new
Action
<
string
,
string
>((
code
,
msg
)
=>
{
Debug
.
unityLogger
.
Log
(
"获取歌曲列表 "
+
code
+
" msg "
+
msg
);
}));
}
/// <summary>
/// 合成歌曲上报
/// </summary>
public
void
GetNoteCompleted
(
int
song_id
)
{
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
...
...
Assets/Scripts/Main/HomeInfoControl.cs
View file @
93f53a69
...
...
@@ -33,7 +33,7 @@ public class HomeInfoControl : MonoBehaviour
UIMgr
.
Getinstance
().
ShowPanel
<
MainPanel
>(
E_Layer
.
mid
);
UIMgr
.
Getinstance
().
ShowPanel
<
TouchPanel
>(
E_Layer
.
bot
);
GameController
.
GetInstance
().
GetSongsList
(
0
);
//
GameController.GetInstance().GetSongsList(0);
GameController
.
GetInstance
().
GetWithdrawList
(
1
);
}
...
...
Assets/Scripts/Panel/MainPanel.cs
View file @
93f53a69
...
...
@@ -26,6 +26,7 @@ public class MainPanel : BasePanel
{
GetControl
<
Text
>(
"CashNumTv"
).
text
=
"¥"
+
result
.
available
;
GetControl
<
Text
>(
"FruitNumTv"
).
text
=
result
.
count
+
"个"
;
GetControl
<
Button
>(
"MyMusic"
).
onClick
.
AddListener
(()
=>
{
UIMgr
.
Getinstance
().
ShowPanel
<
MusicPanel
>(
E_Layer
.
lower_top
);
});
}),
new
Action
<
string
,
string
>((
code
,
msg
)
=>
{
Debug
.
unityLogger
.
Log
(
"首页信息 "
+
code
+
" msg "
+
msg
);
...
...
Assets/Scripts/Panel/MusicPanel.cs
View file @
93f53a69
using
System.Collections
;
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.UI
;
...
...
@@ -12,7 +13,25 @@ public class MusicPanel : BasePanel
public
override
void
OnInit
(
object
data
=
null
)
{
//GetControl<Button>("btnBack").onClick.AddListener()
GetControl
<
Button
>(
"btnBack"
).
onClick
.
AddListener
(()
=>{
UIMgr
.
Getinstance
().
HidePanel
<
MusicPanel
>();
});
#
region
通过数据初始化面板
Dictionary
<
string
,
object
>
paras
=
new
Dictionary
<
string
,
object
>();
paras
.
Add
(
"song_id"
,
1
);
HttpTool
.
Instance
.
_Get
(
"app/v1/watermelon/songs_list"
,
paras
,
new
Action
<
SongBean
>((
result
)
=>
{
for
(
int
i
=
0
;
i
<
result
.
list
.
Count
;
i
++)
{
GameObject
obj
=
ResMgr
.
Getinstance
().
Load
<
GameObject
>(
"Cells/MusicCell"
);
obj
.
transform
.
SetParent
(
GetControl
<
ScrollRect
>(
"svMusic"
).
content
.
transform
);
}
}),
new
Action
<
string
,
string
>((
code
,
msg
)
=>
{
Debug
.
unityLogger
.
Log
(
"获取歌曲列表 "
+
code
+
" msg "
+
msg
);
}));
#
endregion
}
public
override
void
OnRefresh
(
object
data
=
null
)
...
...
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