Commit b76fb8ab authored by LiLiuZhou's avatar LiLiuZhou

Merge branch 'master' of gitlab.huolea.com:wangxuewei/musicbigwatermelon

parents fb7e49e5 83d24a6b
......@@ -2,20 +2,23 @@
using System.Collections.Generic;
using UnityEngine;
public class AudioManager : MonoBehaviour
public class AudioManager : MonoBaseMgr<AudioManager>
{
private GameObject PlayMusic;
private AudioSource mAudiSource;
public static AudioManager Instance;
private void Awake()
{
Instance = this;
mAudiSource = GetComponent<AudioSource>();
mAudiSource = PlayMusic.AddComponent<AudioSource>();
}
public IEnumerator LoadAudio(string recordPath)
public void PlayAudio(string MusicUrl)
{
StartCoroutine(LoadAudio(MusicUrl));
}
private IEnumerator LoadAudio(string MusicUrl)
{
// www 加载音频
WWW www = new WWW(recordPath);
WWW www = new WWW(MusicUrl);
yield return www;
var clipTemp = www.GetAudioClip();
mAudiSource.clip = clipTemp;
......@@ -25,7 +28,7 @@ public class AudioManager : MonoBehaviour
}
private void Update()
{
Debug.unityLogger.Log("是否暂停"+ mAudiSource.isPlaying);
//Debug.unityLogger.Log("是否暂停"+ mAudiSource.isPlaying);
}
public void StopPlay()
{
......
......@@ -49,7 +49,7 @@ public class GameController : MonoBehaviour
{
Dictionary<string, object> paras = new Dictionary<string, object>();
paras.Add("type", type);
HttpTool.Instance._Get("app/v1/watermelon/list_wd", paras, new Action<EmptyBean>((result) =>
HttpTool.Instance._Get("app/v1/watermelon/list_wd", paras, new Action<WithDrawBean>((result) =>
{
}), new Action<string, string>((code, msg) =>
......@@ -66,7 +66,7 @@ public class GameController : MonoBehaviour
{
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<EmptyBean>((result) =>
HttpTool.Instance._Get("app/v1/watermelon/songs_list", paras, new Action<SongBean>((result) =>
{
}), new Action<string, string>((code, msg) =>
......@@ -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);
}));
}
}
......@@ -28,9 +28,13 @@ public class HomeInfoControl : MonoBehaviour
//GetHomeInfo();
//获取下一组要生成的水果的音符
//GameController.GetInstance().GetNextNoteList(0);
//
UIMgr.Getinstance().ShowPanel<MainPanel>(E_Layer.mid);
UIMgr.Getinstance().ShowPanel<TouchPanel>(E_Layer.bot);
GameController.GetInstance().GetSongsList(0);
GameController.GetInstance().GetWithdrawList(1);
}
......
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; }
}
fileFormatVersion: 2
guid: 58243d454dd78024ab8f6e281b70a2ea
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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; }
}
fileFormatVersion: 2
guid: 9cb6b49ed36691242bc124d4d59f0108
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment