58 lines
1.4 KiB
C#
58 lines
1.4 KiB
C#
using Axibug.Runtime;
|
|
using Bright.Serialization;
|
|
using System.IO;
|
|
using Game.Config;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using UnityEngine;
|
|
using static Axibug.Utility;
|
|
|
|
namespace Game
|
|
{
|
|
public class LubanNoMono : NoMono
|
|
{
|
|
public Tables tables = null;
|
|
|
|
#region ÉúÃüÖÜÆÚ
|
|
public LubanNoMono(string Name, Transform trans = null) : base(Name, trans)
|
|
{
|
|
tables = new Tables(LoadByteBuf);
|
|
//×¢²á»Øµ÷
|
|
AddEvent(E_LIFE_MONO_CYCLE.Update | E_LIFE_MONO_CYCLE.FixUpdate);
|
|
}
|
|
public override void Update()
|
|
{
|
|
|
|
}
|
|
public override void FixedUpdate()
|
|
{
|
|
|
|
}
|
|
public override void OnApplicationPause()
|
|
{
|
|
|
|
}
|
|
public override void OnApplicationQuit()
|
|
{
|
|
|
|
}
|
|
#endregion
|
|
|
|
public static string GetConfigBytesPath(string fileName)
|
|
{
|
|
if (AppEntry.Base.EditorResourceMode)
|
|
return Text.Format("Assets/GameAssets/LubanTables/{0}.bytes", fileName);
|
|
else
|
|
return Text.Format("{0}/Configs/DataTables/{1}.bytes", Application.persistentDataPath, fileName);
|
|
}
|
|
|
|
private static ByteBuf LoadByteBuf(string file)
|
|
{
|
|
string path = GetConfigBytesPath(file);
|
|
|
|
return new ByteBuf(File.ReadAllBytes(path));
|
|
}
|
|
}
|
|
}
|
|
|