using System.Collections.Generic; using System.Text; using UnityEditor; using UnityEngine; using System.Collections; using System.IO; using System; using NUnit.Framework; using Thousandto.Cfg.Data; using Thousandto.Code.Center; using Thousandto.Code.Global; using Thousandto.Code.Logic; using Thousandto.Core.Asset; using Thousandto.Core.Base; using Thousandto.Plugins.Common; using CoroutinePool = UnityEngine.Gonbest.MagicCube.CoroutinePool; namespace Funcell.DIY.UniScene { public class BanshuTest : EditorWindow { [MenuItem("Ares/测试工具/版署测试")] static void Init() { var win = (BanshuTest)EditorWindow.GetWindow(typeof(BanshuTest)); win.Show(); } private void OnGUI() { if(GUILayout.Button("检查屏蔽字")) { Debug.Log ("Start Test"); string s = "1 东伊运,2 世维会,3 真主,4 安拉"; string text = System.IO.File.ReadAllText(@"F:\new1.txt"); //F盘的new1.txt为屏蔽字库 List<string> list = new List<string>(s.Split(','));//视具体使用字符串还是读文本 foreach (string t in list) { //Debug.Log (t); MSG_Chat.ChatReqCS req = new MSG_Chat.ChatReqCS(); req.chattype = 0; req.recRoleId = 0; req.condition = t; req.chatchannel = 0; req.Send(); //System.Threading.Thread.Sleep(10); CoroutinePool.AddTask(waittime()); } } if(GUILayout.Button("代码测试")) { Debug.Log ("代码测试开始"); /* GameObject go = GameObject.Find("AccessedArea/TaskScroll/Grid/Task"); Debug.Log (go.transform.parent.GetChild(0).GetChild(0).GetComponent<UILabel>().text); Debug.Log (go.transform.parent.GetChild(1).GetChild(0).GetComponent<UILabel>().text); Debug.Log (go.transform.parent.GetChild(2).GetChild(0).GetComponent<UILabel>().text); Debug.Log (go.transform.parent.GetChild(3).GetChild(0).GetComponent<UILabel>().text); LocalPlayer lp = GameCenter.GameSceneSystem.GetLocalPlayer(); if (lp.IsXState(EntityStateID.PathMove)) { Debug.Log ("寻路中"); GameCenter.MapLogicSwitch:DoPlayerExitPrepare(); } */ Debug.Log ("代码测试结束"); } } private IEnumerator waittime() { Debug.Log ("Wait"); yield return new WaitForSeconds(0.01f); } } }