| 123456789101112131415161718192021222324252627282930 |
- using UnityEngine;
- using XLua;
- namespace XLuaTest
- {
- public class CoroutineTest : MonoBehaviour
- {
- LuaEnv luaenv = null;
- // Use this for initialization
- void Start()
- {
- luaenv = new LuaEnv();
- luaenv.DoString("require 'coruntine_test'");
- }
- // Update is called once per frame
- void Update()
- {
- if (luaenv != null)
- {
- luaenv.Tick();
- }
- }
- void OnDestroy()
- {
- luaenv.Dispose();
- }
- }
- }
|