using UnityEngine;
using System.Collections.Generic;
using System.Reflection;
using LuaInterface;
using System;
namespace GameLogic {
public static class LuaHelper {
///
/// getType
///
///
///
public static System.Type GetType(string classname) {
Assembly assb = Assembly.GetExecutingAssembly(); //.GetExecutingAssembly();
System.Type t = null;
t = assb.GetType(classname); ;
if (t == null) {
t = assb.GetType(classname);
}
return t;
}
///
/// pbc/pblua函数回调
///
///
public static void OnCallLuaFunc(LuaByteBuffer data, LuaFunction func)
{
if (func != null) func.Call(data);
Debug.LogWarning("OnCallLuaFunc length:>>" + data.buffer.Length);
}
///
/// cjson函数回调
///
///
///
public static void OnJsonCallFunc(string data, LuaFunction func)
{
Debug.LogWarning("OnJsonCallback data:>>" + data + " lenght:>>" + data.Length);
if (func != null) func.Call(data);
}
}
}