76 lines
1.8 KiB
C#
76 lines
1.8 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class ErrorLogHookManager : MonoBehaviour
|
|
{
|
|
[RuntimeInitializeOnLoadMethod]
|
|
static void OnRuntimeMethodLoad()
|
|
{
|
|
new GameObject("ErrorLogHookManager").AddComponent<ErrorLogHookManager>();
|
|
}
|
|
|
|
private void Awake()
|
|
{
|
|
DontDestroyOnLoad(gameObject);
|
|
}
|
|
|
|
private void OnEnable()
|
|
{
|
|
Application.logMessageReceived += HandleLog;
|
|
}
|
|
|
|
private void OnDisable()
|
|
{
|
|
Application.logMessageReceived -= HandleLog;
|
|
}
|
|
|
|
void HandleLog(string logString, string stackTrace, LogType type)
|
|
{
|
|
#if !FGB_LIVE
|
|
switch (type)
|
|
{
|
|
case LogType.Error:
|
|
case LogType.Exception:
|
|
if (Popup.Ins) Popup.Ins.Set(ePopupType.One, 174, null, null, logString);
|
|
break;
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
|
|
public partial class SROptions
|
|
{
|
|
#if UNITY_EDITOR
|
|
public eItem Item { get; set; }
|
|
public int ID { get; set; }
|
|
double _amount = 1000;
|
|
public double Amount { get { return _amount; } set { _amount = value; } }
|
|
public void Add_Item()
|
|
{
|
|
ServerInfo.Ins.m_ServerData.Add_Item(ID, Amount);
|
|
}
|
|
public void Init_Daily()
|
|
{
|
|
ServerInfo.Ins.m_ServerData.Init_Daily();
|
|
}
|
|
public void Add_AllSkillLv()
|
|
{
|
|
var lst = table_skilllist.Ins.Get_DataList();
|
|
for (int i = 0; i < lst.Count; i++)
|
|
{
|
|
ServerInfo.Ins.m_ServerData.Add_SkillLv(lst[i].n_SkillID);
|
|
}
|
|
}
|
|
public void Awaken_AllSkill()
|
|
{
|
|
var lst = table_skilllist.Ins.Get_DataList(eSkillType.Active);
|
|
for (int i = 0; i < lst.Count; i++)
|
|
{
|
|
ServerInfo.Ins.m_ServerData.Add_SkillAwakenLv(lst[i].n_SkillID);
|
|
}
|
|
}
|
|
#endif
|
|
} |