• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# LuaState类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中LuaState的典型用法代码示例。如果您正苦于以下问题:C# LuaState类的具体用法?C# LuaState怎么用?C# LuaState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LuaState类属于命名空间,在下文中一共展示了LuaState类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Register

	public static void Register(LuaState L)
	{
		L.BeginClass(typeof(UnityEngine.UI.Selectable), typeof(UnityEngine.EventSystems.UIBehaviour));
		L.RegFunction("IsInteractable", IsInteractable);
		L.RegFunction("FindSelectable", FindSelectable);
		L.RegFunction("FindSelectableOnLeft", FindSelectableOnLeft);
		L.RegFunction("FindSelectableOnRight", FindSelectableOnRight);
		L.RegFunction("FindSelectableOnUp", FindSelectableOnUp);
		L.RegFunction("FindSelectableOnDown", FindSelectableOnDown);
		L.RegFunction("OnMove", OnMove);
		L.RegFunction("OnPointerDown", OnPointerDown);
		L.RegFunction("OnPointerUp", OnPointerUp);
		L.RegFunction("OnPointerEnter", OnPointerEnter);
		L.RegFunction("OnPointerExit", OnPointerExit);
		L.RegFunction("OnSelect", OnSelect);
		L.RegFunction("OnDeselect", OnDeselect);
		L.RegFunction("Select", Select);
		L.RegFunction("__eq", op_Equality);
		L.RegFunction("__tostring", ToLua.op_ToString);
		L.RegVar("allSelectables", get_allSelectables, null);
		L.RegVar("navigation", get_navigation, set_navigation);
		L.RegVar("transition", get_transition, set_transition);
		L.RegVar("colors", get_colors, set_colors);
		L.RegVar("spriteState", get_spriteState, set_spriteState);
		L.RegVar("animationTriggers", get_animationTriggers, set_animationTriggers);
		L.RegVar("targetGraphic", get_targetGraphic, set_targetGraphic);
		L.RegVar("interactable", get_interactable, set_interactable);
		L.RegVar("image", get_image, set_image);
		L.RegVar("animator", get_animator, null);
		L.EndClass();
	}
开发者ID:woshihuo12,项目名称:UnityHello,代码行数:31,代码来源:UnityEngine_UI_SelectableWrap.cs


示例2: Register

 public static void Register(LuaState L)
 {
     L.BeginClass(typeof(UnityEngine.UI.Dropdown.DropdownEvent), typeof(UnityEngine.Events.UnityEvent<int>));
     L.RegFunction("New", _CreateUnityEngine_UI_Dropdown_DropdownEvent);
     L.RegFunction("__tostring", ToLua.op_ToString);
     L.EndClass();
 }
开发者ID:yuisunn,项目名称:UnityCrazy,代码行数:7,代码来源:UnityEngine_UI_Dropdown_DropdownEventWrap.cs


示例3: lock

 /// <summary>Returns the given string's characters in their numeric ASCII representation.</summary>
 /// <param name="luaState">Pointer to lua_State struct.</param>
 /// <param name="inputString">The string to get the chars from.</param>
 /// <param name="startPos">The first character of the string to get the byte of.</param>
 /// <param name="endPos">The last character of the string to get the byte of.</param>
 /// <returns>Numerical bytes.</returns>
 public static byte[] @byte(LuaState luaState, string inputString, uint startPos = 1U, uint endPos = 1U)
 {
     lock (SyncRoot)
     {
         if (startPos > inputString.Length)
         {
             return null;
         }
         if (startPos < 1U)
         {
             startPos = 1U;
         }
         if (endPos < startPos)
         {
             endPos = startPos;
         }
         lua_getglobal(luaState, nameof(@string));
         lua_getfield(luaState, -1, nameof(@byte));
         lua_pushstring(luaState, inputString);
         lua_pushnumber(luaState, startPos);
         lua_pushnumber(luaState, endPos);
         int length = (int)(1 + (endPos - startPos));
         lua_pcall(luaState, 3, length);
         byte[] numericalBytes = new byte[length];
         for (int i = 0; i < length; ++i)
         {
             numericalBytes[i] = (byte)lua_tointeger(luaState, -1 - i);
         }
         return numericalBytes;
     }
 }
开发者ID:OmegaExtern,项目名称:gmod-csharp-binary-module,代码行数:37,代码来源:string.cs


示例4: Register

 public static void Register(LuaState L)
 {
     L.BeginStaticLibs("QualitySettings");
     L.RegFunction("GetQualityLevel", GetQualityLevel);
     L.RegFunction("SetQualityLevel", SetQualityLevel);
     L.RegFunction("IncreaseLevel", IncreaseLevel);
     L.RegFunction("DecreaseLevel", DecreaseLevel);
     L.RegFunction("__eq", op_Equality);
     L.RegVar("names", get_names, null);
     L.RegVar("pixelLightCount", get_pixelLightCount, set_pixelLightCount);
     L.RegVar("shadowProjection", get_shadowProjection, set_shadowProjection);
     L.RegVar("shadowCascades", get_shadowCascades, set_shadowCascades);
     L.RegVar("shadowDistance", get_shadowDistance, set_shadowDistance);
     L.RegVar("shadowCascade2Split", get_shadowCascade2Split, set_shadowCascade2Split);
     L.RegVar("shadowCascade4Split", get_shadowCascade4Split, set_shadowCascade4Split);
     L.RegVar("masterTextureLimit", get_masterTextureLimit, set_masterTextureLimit);
     L.RegVar("anisotropicFiltering", get_anisotropicFiltering, set_anisotropicFiltering);
     L.RegVar("lodBias", get_lodBias, set_lodBias);
     L.RegVar("maximumLODLevel", get_maximumLODLevel, set_maximumLODLevel);
     L.RegVar("particleRaycastBudget", get_particleRaycastBudget, set_particleRaycastBudget);
     L.RegVar("softVegetation", get_softVegetation, set_softVegetation);
     L.RegVar("realtimeReflectionProbes", get_realtimeReflectionProbes, set_realtimeReflectionProbes);
     L.RegVar("billboardsFaceCameraPosition", get_billboardsFaceCameraPosition, set_billboardsFaceCameraPosition);
     L.RegVar("maxQueuedFrames", get_maxQueuedFrames, set_maxQueuedFrames);
     L.RegVar("vSyncCount", get_vSyncCount, set_vSyncCount);
     L.RegVar("antiAliasing", get_antiAliasing, set_antiAliasing);
     L.RegVar("desiredColorSpace", get_desiredColorSpace, null);
     L.RegVar("activeColorSpace", get_activeColorSpace, null);
     L.RegVar("blendWeights", get_blendWeights, set_blendWeights);
     L.EndStaticLibs();
 }
开发者ID:zhangxiangsong,项目名称:some_work,代码行数:31,代码来源:UnityEngine_QualitySettingsWrap.cs


示例5: Register

 public static void Register(LuaState L)
 {
     L.BeginClass(typeof(UnityEngine.Animation), typeof(UnityEngine.Behaviour));
     L.RegFunction("Stop", Stop);
     L.RegFunction("Rewind", Rewind);
     L.RegFunction("Sample", Sample);
     L.RegFunction("IsPlaying", IsPlaying);
     L.RegFunction("get_Item", get_Item);
     L.RegFunction("Play", Play);
     L.RegFunction("CrossFade", CrossFade);
     L.RegFunction("Blend", Blend);
     L.RegFunction("CrossFadeQueued", CrossFadeQueued);
     L.RegFunction("PlayQueued", PlayQueued);
     L.RegFunction("AddClip", AddClip);
     L.RegFunction("RemoveClip", RemoveClip);
     L.RegFunction("GetClipCount", GetClipCount);
     L.RegFunction("SyncLayer", SyncLayer);
     L.RegFunction("GetEnumerator", GetEnumerator);
     L.RegFunction("GetClip", GetClip);
     L.RegFunction("New", _CreateUnityEngine_Animation);
     L.RegVar("this", _this, null);
     L.RegFunction("__eq", op_Equality);
     L.RegFunction("__tostring", Lua_ToString);
     L.RegVar("clip", get_clip, set_clip);
     L.RegVar("playAutomatically", get_playAutomatically, set_playAutomatically);
     L.RegVar("wrapMode", get_wrapMode, set_wrapMode);
     L.RegVar("isPlaying", get_isPlaying, null);
     L.RegVar("animatePhysics", get_animatePhysics, set_animatePhysics);
     L.RegVar("cullingType", get_cullingType, set_cullingType);
     L.RegVar("localBounds", get_localBounds, set_localBounds);
     L.EndClass();
 }
开发者ID:youxibuhaowana,项目名称:01ulua,代码行数:32,代码来源:UnityEngine_AnimationWrap.cs


示例6: luaF_findupval

		public static UpVal luaF_findupval (LuaState L, StkId level) {
		  GlobalState g = G(L);
		  GCObjectRef pp = new OpenValRef(L);
		  UpVal p;
		  UpVal uv;
		  while (pp.get() != null && (p = ngcotouv(pp.get())).v >= level) {
			lua_assert(p.v != p.u.value);
			if (p.v == level) {  /* found a corresponding upvalue? */
			  if (isdead(g, obj2gco(p)))  /* is it dead? */
				changewhite(obj2gco(p));  /* ressurect it */
			  return p;
			}
			pp = new NextRef(p);
		  }
		  uv = luaM_new<UpVal>(L);  /* not found: create a new one */
		  uv.tt = LUA_TUPVAL;
		  uv.marked = luaC_white(g);
		  uv.v = level;  /* current value lives in the stack */
		  uv.next = pp.get();  /* chain it in the proper position */
		  pp.set( obj2gco(uv) );
		  uv.u.l.prev = g.uvhead;  /* double link it in `uvhead' list */
		  uv.u.l.next = g.uvhead.u.l.next;
		  uv.u.l.next.u.l.prev = uv;
		  g.uvhead.u.l.next = uv;
		  lua_assert(uv.u.l.next.u.l.prev == uv && uv.u.l.prev.u.l.next == uv);
		  return uv;
		}
开发者ID:chenzuo,项目名称:SharpLua,代码行数:27,代码来源:lfunc.cs


示例7: Register

 public static void Register(LuaState L)
 {
     L.BeginClass(typeof(System.Collections.Generic.Dictionary<int,TestAccount>), typeof(System.Object), "AccountMap");
     L.RegFunction(".geti", get_Item);
     L.RegFunction("get_Item", get_Item);
     L.RegFunction(".seti", set_Item);
     L.RegFunction("set_Item", set_Item);
     L.RegFunction("Add", Add);
     L.RegFunction("Clear", Clear);
     L.RegFunction("ContainsKey", ContainsKey);
     L.RegFunction("ContainsValue", ContainsValue);
     L.RegFunction("GetObjectData", GetObjectData);
     L.RegFunction("OnDeserialization", OnDeserialization);
     L.RegFunction("Remove", Remove);
     L.RegFunction("TryGetValue", TryGetValue);
     L.RegFunction("GetEnumerator", GetEnumerator);
     L.RegFunction("New", _CreateSystem_Collections_Generic_Dictionary_int_TestAccount);
     L.RegVar("this", _this, null);
     L.RegFunction("__tostring", ToLua.op_ToString);
     L.RegVar("Count", get_Count, null);
     L.RegVar("Comparer", get_Comparer, null);
     L.RegVar("Keys", get_Keys, null);
     L.RegVar("Values", get_Values, null);
     L.EndClass();
 }
开发者ID:woshihuo12,项目名称:UnityHello,代码行数:25,代码来源:System_Collections_Generic_Dictionary_int_TestAccountWrap.cs


示例8: Register

	public static void Register(LuaState L)
	{
		L.BeginClass(typeof(ByteBuffer), typeof(System.Object));
		L.RegFunction("Close", Close);
		L.RegFunction("WriteByte", WriteByte);
		L.RegFunction("WriteInt", WriteInt);
		L.RegFunction("WriteShort", WriteShort);
		L.RegFunction("WriteLong", WriteLong);
		L.RegFunction("WriteFloat", WriteFloat);
		L.RegFunction("WriteDouble", WriteDouble);
		L.RegFunction("WriteString", WriteString);
		L.RegFunction("WriteBytes", WriteBytes);
		L.RegFunction("WriteBuffer", WriteBuffer);
		L.RegFunction("ReadByte", ReadByte);
		L.RegFunction("ReadInt", ReadInt);
		L.RegFunction("ReadShort", ReadShort);
		L.RegFunction("ReadLong", ReadLong);
		L.RegFunction("ReadFloat", ReadFloat);
		L.RegFunction("ReadDouble", ReadDouble);
		L.RegFunction("ReadString", ReadString);
		L.RegFunction("ReadBytes", ReadBytes);
		L.RegFunction("ReadBuffer", ReadBuffer);
		L.RegFunction("ToBytes", ToBytes);
		L.RegFunction("Flush", Flush);
		L.RegFunction("New", _CreateByteBuffer);
		L.RegFunction("__tostring", ToLua.op_ToString);
		L.EndClass();
	}
开发者ID:woshihuo12,项目名称:UnityHello,代码行数:28,代码来源:ByteBufferWrap.cs


示例9: luaS_resize

		public static void luaS_resize (LuaState L, int newsize) {
		  GCObject[] newhash;
		  stringtable tb;
		  int i;
		  if (G(L).gcstate == GCSsweepstring)
			return;  /* cannot resize during GC traverse */		  
		  newhash = new GCObject[newsize];
		  AddTotalBytes(L, newsize * GetUnmanagedSize(typeof(GCObjectRef)));
		  tb = G(L).strt;
		  for (i=0; i<newsize; i++) newhash[i] = null;

		  /* rehash */
		  for (i=0; i<tb.size; i++) {
			GCObject p = tb.hash[i];
			while (p != null) {  /* for each node in the list */
			  GCObject next = p.gch.next;  /* save next */
			  uint h = gco2ts(p).hash;
			  int h1 = (int)lmod(h, newsize);  /* new position */
			  lua_assert((int)(h%newsize) == lmod(h, newsize));
			  p.gch.next = newhash[h1];  /* chain it */
			  newhash[h1] = p;
			  p = next;
			}
		  }
		  //luaM_freearray(L, tb.hash);
		  if (tb.hash != null)
			  SubtractTotalBytes(L, tb.hash.Length * GetUnmanagedSize(typeof(GCObjectRef)));
		  tb.size = newsize;
		  tb.hash = newhash;
		}
开发者ID:chenzuo,项目名称:SharpLua,代码行数:30,代码来源:lstring.cs


示例10: newlstr

		public static TString newlstr (LuaState L, CharPtr str, uint l,
											   uint h) {
		  TString ts;
		  stringtable tb;
		  if (l+1 > MAX_SIZET /GetUnmanagedSize(typeof(char)))
		    luaM_toobig(L);
		  ts = new TString(new char[l+1]);
		  AddTotalBytes(L, (int)(l + 1) * GetUnmanagedSize(typeof(char)) + GetUnmanagedSize(typeof(TString)));
		  ts.tsv.len = l;
		  ts.tsv.hash = h;
		  ts.tsv.marked = luaC_white(G(L));
		  ts.tsv.tt = LUA_TSTRING;
		  ts.tsv.reserved = 0;
		  //memcpy(ts+1, str, l*GetUnmanagedSize(typeof(char)));
		  memcpy(ts.str.chars, str.chars, str.index, (int)l);
		  ts.str[l] = '\0';  /* ending 0 */
		  tb = G(L).strt;
		  h = (uint)lmod(h, tb.size);
		  ts.tsv.next = tb.hash[h];  /* chain new entry */
		  tb.hash[h] = obj2gco(ts);
		  tb.nuse++;
		  if ((tb.nuse > (int)tb.size) && (tb.size <= MAX_INT/2))
		    luaS_resize(L, tb.size*2);  /* too crowded */
		  return ts;
		}
开发者ID:chenzuo,项目名称:SharpLua,代码行数:25,代码来源:lstring.cs


示例11: Remove

		public void Remove (LuaState luaState)
		{
			if (!translators.ContainsKey (luaState))
				return;
			
			translators.Remove (luaState);
		}
开发者ID:wilcomega,项目名称:Unity3D-NLua,代码行数:7,代码来源:ObjectTranslatorPool.cs


示例12: Register

 public static void Register(LuaState L)
 {
     L.BeginStaticLibs("RenderSettings");
     L.RegFunction("__eq", op_Equality);
     L.RegVar("fog", get_fog, set_fog);
     L.RegVar("fogMode", get_fogMode, set_fogMode);
     L.RegVar("fogColor", get_fogColor, set_fogColor);
     L.RegVar("fogDensity", get_fogDensity, set_fogDensity);
     L.RegVar("fogStartDistance", get_fogStartDistance, set_fogStartDistance);
     L.RegVar("fogEndDistance", get_fogEndDistance, set_fogEndDistance);
     L.RegVar("ambientMode", get_ambientMode, set_ambientMode);
     L.RegVar("ambientSkyColor", get_ambientSkyColor, set_ambientSkyColor);
     L.RegVar("ambientEquatorColor", get_ambientEquatorColor, set_ambientEquatorColor);
     L.RegVar("ambientGroundColor", get_ambientGroundColor, set_ambientGroundColor);
     L.RegVar("ambientLight", get_ambientLight, set_ambientLight);
     L.RegVar("ambientIntensity", get_ambientIntensity, set_ambientIntensity);
     L.RegVar("ambientProbe", get_ambientProbe, set_ambientProbe);
     L.RegVar("reflectionIntensity", get_reflectionIntensity, set_reflectionIntensity);
     L.RegVar("reflectionBounces", get_reflectionBounces, set_reflectionBounces);
     L.RegVar("haloStrength", get_haloStrength, set_haloStrength);
     L.RegVar("flareStrength", get_flareStrength, set_flareStrength);
     L.RegVar("flareFadeSpeed", get_flareFadeSpeed, set_flareFadeSpeed);
     L.RegVar("skybox", get_skybox, set_skybox);
     L.RegVar("sun", get_sun, set_sun);
     L.RegVar("defaultReflectionMode", get_defaultReflectionMode, set_defaultReflectionMode);
     L.RegVar("defaultReflectionResolution", get_defaultReflectionResolution, set_defaultReflectionResolution);
     L.RegVar("customReflection", get_customReflection, set_customReflection);
     L.EndStaticLibs();
 }
开发者ID:yuisunn,项目名称:UnityCrazy,代码行数:29,代码来源:UnityEngine_RenderSettingsWrap.cs


示例13: Register

	public static void Register(LuaState L)
	{
		L.BeginClass(typeof(UnityEngine.UI.LoopVerticalScrollRect), typeof(UnityEngine.UI.LoopScrollRect));
		L.RegFunction("__eq", op_Equality);
		L.RegFunction("__tostring", ToLua.op_ToString);
		L.EndClass();
	}
开发者ID:woshihuo12,项目名称:UnityHello,代码行数:7,代码来源:UnityEngine_UI_LoopVerticalScrollRectWrap.cs


示例14: Start

 // Use this for initialization
 void Start()
 {
     //只是展示如何加载文件。不是推荐这么做
     LuaState l = new LuaState();
     string path = Application.dataPath + "/uLua/Examples/04_ScriptsFromFile/ScriptsFromFile02.lua";        
     l.DoFile(path);
 }
开发者ID:ZeroToken,项目名称:MyTools,代码行数:8,代码来源:ScriptsFromFile_02.cs


示例15: luaF_newupval

		public static UpVal luaF_newupval (LuaState L) {
		  UpVal uv = luaM_new<UpVal>(L);
		  luaC_link(L, obj2gco(uv), LUA_TUPVAL);
		  uv.v = uv.u.value;
		  setnilvalue(uv.v);
		  return uv;
		}
开发者ID:chenzuo,项目名称:SharpLua,代码行数:7,代码来源:lfunc.cs


示例16: Register

	public static void Register(LuaState L)
	{
		L.BeginClass(typeof(UnityEngine.Light), typeof(UnityEngine.Behaviour));
		L.RegFunction("AddCommandBuffer", AddCommandBuffer);
		L.RegFunction("RemoveCommandBuffer", RemoveCommandBuffer);
		L.RegFunction("RemoveCommandBuffers", RemoveCommandBuffers);
		L.RegFunction("RemoveAllCommandBuffers", RemoveAllCommandBuffers);
		L.RegFunction("GetCommandBuffers", GetCommandBuffers);
		L.RegFunction("GetLights", GetLights);
		L.RegFunction("New", _CreateUnityEngine_Light);
		L.RegFunction("__eq", op_Equality);
		L.RegFunction("__tostring", ToLua.op_ToString);
		L.RegVar("type", get_type, set_type);
		L.RegVar("color", get_color, set_color);
		L.RegVar("intensity", get_intensity, set_intensity);
		L.RegVar("bounceIntensity", get_bounceIntensity, set_bounceIntensity);
		L.RegVar("shadows", get_shadows, set_shadows);
		L.RegVar("shadowStrength", get_shadowStrength, set_shadowStrength);
		L.RegVar("shadowBias", get_shadowBias, set_shadowBias);
		L.RegVar("shadowNormalBias", get_shadowNormalBias, set_shadowNormalBias);
		L.RegVar("shadowNearPlane", get_shadowNearPlane, set_shadowNearPlane);
		L.RegVar("range", get_range, set_range);
		L.RegVar("spotAngle", get_spotAngle, set_spotAngle);
		L.RegVar("cookieSize", get_cookieSize, set_cookieSize);
		L.RegVar("cookie", get_cookie, set_cookie);
		L.RegVar("flare", get_flare, set_flare);
		L.RegVar("renderMode", get_renderMode, set_renderMode);
		L.RegVar("alreadyLightmapped", get_alreadyLightmapped, set_alreadyLightmapped);
		L.RegVar("cullingMask", get_cullingMask, set_cullingMask);
		L.RegVar("commandBufferCount", get_commandBufferCount, null);
		L.EndClass();
	}
开发者ID:woshihuo12,项目名称:UnityHello,代码行数:32,代码来源:UnityEngine_LightWrap.cs


示例17: Start

    void Start()
    {
        lua = new LuaState();
        lua.Start();
        LuaBinder.Bind(lua);
        lua.DoString(script, "TestInherit.cs");

        float time = Time.realtimeSinceStartup;

        for (int i = 0; i < 200000; i++)
        {
            Vector3 v = transform.position;
            transform.position = v;
        }

        time = Time.realtimeSinceStartup - time;
        Debugger.Log("c# Transform get set cost time: " + time);

        LuaFunction func = lua.GetFunction("Test");
        func.BeginPCall();
        func.Push(transform);
        func.PCall();
        func.EndPCall();

        lua.CheckTop();
        lua.Dispose();
        lua = null;
    }
开发者ID:woshihuo12,项目名称:UnityHello,代码行数:28,代码来源:TestInherit.cs


示例18: Start

	void Start () 
    {
		#if UNITY_5		
		Application.logMessageReceived += ShowTips;
		#else
		Application.RegisterLogCallback(ShowTips);           
		#endif
		new LuaResLoader();
        LuaState lua = new LuaState();
        lua.Start();
        lua.DoString(script);				                   

        LuaFunction func = lua.GetFunction("TestInt64");
        func.BeginPCall();
		func.PushInt64(9223372036854775807 - 789);
        func.PCall();
        LuaInteger64 n64 = func.CheckInteger64();
        Debugger.Log("int64 return from lua is: {0}", n64);
        func.EndPCall();
        func.Dispose();
        func = null;

        lua.CheckTop();    
		lua.Dispose();  
		lua = null;
	}	
开发者ID:zlanr,项目名称:tolua,代码行数:26,代码来源:TestInt64.cs


示例19: Register

 public static void Register(LuaState L)
 {
     L.BeginClass(typeof(UnityEngine.Renderer), typeof(UnityEngine.Component));
     L.RegFunction("SetPropertyBlock", SetPropertyBlock);
     L.RegFunction("GetPropertyBlock", GetPropertyBlock);
     L.RegFunction("GetClosestReflectionProbes", GetClosestReflectionProbes);
     L.RegFunction("New", _CreateUnityEngine_Renderer);
     L.RegFunction("__eq", op_Equality);
     L.RegFunction("__tostring", ToLua.op_ToString);
     L.RegVar("isPartOfStaticBatch", get_isPartOfStaticBatch, null);
     L.RegVar("worldToLocalMatrix", get_worldToLocalMatrix, null);
     L.RegVar("localToWorldMatrix", get_localToWorldMatrix, null);
     L.RegVar("enabled", get_enabled, set_enabled);
     L.RegVar("shadowCastingMode", get_shadowCastingMode, set_shadowCastingMode);
     L.RegVar("receiveShadows", get_receiveShadows, set_receiveShadows);
     L.RegVar("material", get_material, set_material);
     L.RegVar("sharedMaterial", get_sharedMaterial, set_sharedMaterial);
     L.RegVar("materials", get_materials, set_materials);
     L.RegVar("sharedMaterials", get_sharedMaterials, set_sharedMaterials);
     L.RegVar("bounds", get_bounds, null);
     L.RegVar("lightmapIndex", get_lightmapIndex, set_lightmapIndex);
     L.RegVar("realtimeLightmapIndex", get_realtimeLightmapIndex, set_realtimeLightmapIndex);
     L.RegVar("lightmapScaleOffset", get_lightmapScaleOffset, set_lightmapScaleOffset);
     L.RegVar("motionVectorGenerationMode", get_motionVectorGenerationMode, set_motionVectorGenerationMode);
     L.RegVar("realtimeLightmapScaleOffset", get_realtimeLightmapScaleOffset, set_realtimeLightmapScaleOffset);
     L.RegVar("isVisible", get_isVisible, null);
     L.RegVar("lightProbeUsage", get_lightProbeUsage, set_lightProbeUsage);
     L.RegVar("lightProbeProxyVolumeOverride", get_lightProbeProxyVolumeOverride, set_lightProbeProxyVolumeOverride);
     L.RegVar("probeAnchor", get_probeAnchor, set_probeAnchor);
     L.RegVar("reflectionProbeUsage", get_reflectionProbeUsage, set_reflectionProbeUsage);
     L.RegVar("sortingLayerName", get_sortingLayerName, set_sortingLayerName);
     L.RegVar("sortingLayerID", get_sortingLayerID, set_sortingLayerID);
     L.RegVar("sortingOrder", get_sortingOrder, set_sortingOrder);
     L.EndClass();
 }
开发者ID:yuisunn,项目名称:UnityCrazy,代码行数:35,代码来源:UnityEngine_RendererWrap.cs


示例20: Lua

    public Lua()
    {
        LuaState.loaderDelegate += luaLoader;
        luaState = new LuaState();

          //  LuaDLL.lua_pushstdcallcfunction(luaState.L, import);
        //LuaDLL.lua_setglobal(luaState.L, "using");

        LuaObject.init(luaState.L);
        bindAll(luaState.L);

        GameObject go = new GameObject("LuaSvrProxy");
        lgo = go.AddComponent<LuaSvrGameObject>();
        GameObject.DontDestroyOnLoad(go);
        lgo.state = luaState;
        lgo.onUpdate = this.tick;

        LuaTimer.reg(luaState.L);
        LuaCoroutine.reg(luaState.L, lgo);
        Helper.reg(luaState.L);
        LuaValueType.reg(luaState.L);
        LuaDLL.luaS_openextlibs(luaState.L);
        /*
        if (LuaDLL.lua_gettop(luaState.L) != errorReported)
        {
            Debug.LogError("Some function not remove temp value from lua stack. You should fix it.");
            errorReported = LuaDLL.lua_gettop(luaState.L);
        }
         * */
    }
开发者ID:hxingchh,项目名称:ME_SLua,代码行数:30,代码来源:Lua.cs



注:本文中的LuaState类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LuaTable类代码示例发布时间:2022-05-24
下一篇:
C# LuaNativeFunction类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap