主界面musiccube相关
parent
a4eda595d1
commit
c27703123c
|
|
@ -1,10 +1,14 @@
|
|||
using Code.Scripts.Gameplay.Game;
|
||||
using cfg.ActorCfg;
|
||||
using Code.Scripts.Gameplay.Game;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using Gameplay.Character;
|
||||
using Gameplay.Net;
|
||||
using Gameplay.Unit;
|
||||
using Gameplay.Unit.Data;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing.Text;
|
||||
|
||||
public partial class SROptions
|
||||
{
|
||||
|
|
@ -134,6 +138,9 @@ public partial class SROptions
|
|||
set { AudioManager.Instance.GlobalIsSpeakOpen = value; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private int _itemId;
|
||||
|
||||
[Category("GM增加物品"), DisplayName("物品ID")]
|
||||
|
|
@ -143,9 +150,21 @@ public partial class SROptions
|
|||
set
|
||||
{
|
||||
if (_itemId.Equals(value)) return;
|
||||
SetItemId(value);
|
||||
_itemId = value;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetItemId(int id)
|
||||
{
|
||||
DataItem dataItem = TableManager.Instance.Tables.Item.Get(id);
|
||||
if ( dataItem==null)
|
||||
{
|
||||
SRDebug.Instance.ShowBugReportSheet(descriptionContent: "此ID不在item表里,查一下是不是填错了");
|
||||
return;
|
||||
}
|
||||
_itemId = id;
|
||||
}
|
||||
private int _itemsCount=1;
|
||||
[Category("GM增加物品"), DisplayName("物品个数")]
|
||||
public int ItemsCount
|
||||
|
|
@ -166,6 +185,8 @@ public partial class SROptions
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
string url = GetURL(GMToken, GetIp(), Actor.Instance.Base.GetProp(NLDPB.ActorProp.ActorId).ToString());
|
||||
var request = UnityEngine.Networking.UnityWebRequest.Get(url);
|
||||
await request.SendWebRequest();
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class MailSystem : Singlenton<MailSystem>, IInitable
|
|||
int Result = a.Status.CompareTo(b.Status);
|
||||
if (Result == 0)
|
||||
{
|
||||
Result = a.SendTime.CompareTo(b.SendTime);
|
||||
Result = b.SendTime.CompareTo(a.SendTime);
|
||||
if (Result == 0)
|
||||
{
|
||||
Result = a.MailID.CompareTo(b.MailID);
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
using Cysharp.Threading.Tasks;
|
||||
using PhxhSDK;
|
||||
using static Gameplay.MusicCubeManager;
|
||||
using UnityEngine;
|
||||
using System.IO;
|
||||
using Gameplay.Net;
|
||||
|
||||
public static class MailSystemTools
|
||||
{
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f48a7713994f61b41b6fae52697edc0e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -8,7 +8,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using Button = UnityEngine.UI.Button;
|
||||
using Image = UnityEngine.UI.Image;
|
||||
|
||||
|
|
@ -505,7 +504,7 @@ public class UI_EmailController : UIWindow
|
|||
int Result = a.Status.CompareTo(b.Status);
|
||||
if (Result == 0)
|
||||
{
|
||||
Result = a.SendTime.CompareTo(b.SendTime);
|
||||
Result = b.SendTime.CompareTo(a.SendTime);
|
||||
if (Result == 0)
|
||||
{
|
||||
Result = a.MailID.CompareTo(b.MailID);
|
||||
|
|
|
|||
|
|
@ -64,18 +64,24 @@ namespace Gameplay
|
|||
//var realPath = Application.dataPath + "/Config/UISomeAbout/MainPanelMusicCube/" + saveName;
|
||||
var realPath = savePath + saveName;
|
||||
// 先判断存不存在
|
||||
if (File.Exists(realPath))
|
||||
{
|
||||
//if (File.Exists(realPath))
|
||||
//{
|
||||
var jsonStr =await AssetManager.Instance.LoadAssetAsync<TextAsset>(realPath);
|
||||
if(jsonStr==null)
|
||||
{
|
||||
DebugUtil.LogError("jsonstr不存在");
|
||||
}
|
||||
//var jsonStr = File.ReadAllText(realPath);
|
||||
return JsonUtility.FromJson<OneMusicData>(jsonStr.text);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// 不存在,进行默认设置
|
||||
return new OneMusicData();
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// DebugUtil.LogError("NEW onemusicData");
|
||||
|
||||
// // 不存在,进行默认设置
|
||||
// return new OneMusicData();
|
||||
//}
|
||||
}
|
||||
public List<float[]> ConvertOneMusicDataToListArray(OneMusicData oneMusicData)
|
||||
{
|
||||
|
|
@ -89,6 +95,10 @@ namespace Gameplay
|
|||
}
|
||||
temp.Add(temp1);
|
||||
}
|
||||
//if(temp.Count==0)
|
||||
//{
|
||||
// DebugUtil.LogError("temp的count数为1");
|
||||
//}
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue