#if USE_UNI_LUA
|
using LuaAPI = UniLua.Lua;
|
using RealStatePtr = UniLua.ILuaState;
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
#else
|
using LuaAPI = XLua.LuaDLL.Lua;
|
using RealStatePtr = System.IntPtr;
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
#endif
|
|
using XLua;
|
using System.Collections.Generic;
|
|
|
namespace XLua.CSObjectWrap
|
{
|
using Utils = XLua.Utils;
|
public class MaterialUtilityWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(MaterialUtility);
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
null, null, null);
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 9, 1, 0);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetDefaultSpriteGrayMaterial", _m_GetDefaultSpriteGrayMaterial_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetInstantiatedSpriteGrayMaterial", _m_GetInstantiatedSpriteGrayMaterial_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSmoothMaskGrayMaterial", _m_GetSmoothMaskGrayMaterial_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetInstantiatedSpriteTwinkleMaterial", _m_GetInstantiatedSpriteTwinkleMaterial_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetUIDefaultGraphicMaterial", _m_GetUIDefaultGraphicMaterial_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetUIBlurMaterial", _m_GetUIBlurMaterial_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetGUIRenderTextureMaterial", _m_GetGUIRenderTextureMaterial_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SwitchXrayShader", _m_SwitchXrayShader_xlua_st_);
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "hudMaterial", _g_get_hudMaterial);
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int __CreateInstance(RealStatePtr L)
|
{
|
return LuaAPI.luaL_error(L, "MaterialUtility does not have a constructor!");
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetDefaultSpriteGrayMaterial_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
|
UnityEngine.Material gen_ret = MaterialUtility.GetDefaultSpriteGrayMaterial( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetInstantiatedSpriteGrayMaterial_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
|
UnityEngine.Material gen_ret = MaterialUtility.GetInstantiatedSpriteGrayMaterial( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetSmoothMaskGrayMaterial_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
|
UnityEngine.Material gen_ret = MaterialUtility.GetSmoothMaskGrayMaterial( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetInstantiatedSpriteTwinkleMaterial_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
|
UnityEngine.Material gen_ret = MaterialUtility.GetInstantiatedSpriteTwinkleMaterial( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetUIDefaultGraphicMaterial_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
|
UnityEngine.Material gen_ret = MaterialUtility.GetUIDefaultGraphicMaterial( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetUIBlurMaterial_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
|
UnityEngine.Material gen_ret = MaterialUtility.GetUIBlurMaterial( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetGUIRenderTextureMaterial_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
|
UnityEngine.Material gen_ret = MaterialUtility.GetGUIRenderTextureMaterial( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_SwitchXrayShader_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
UnityEngine.Material __material = (UnityEngine.Material)translator.GetObject(L, 1, typeof(UnityEngine.Material));
|
bool __isHero = LuaAPI.lua_toboolean(L, 2);
|
|
MaterialUtility.SwitchXrayShader( __material, __isHero );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_hudMaterial(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
translator.Push(L, MaterialUtility.hudMaterial);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
|
|
|
|
}
|
}
|