// Use this for initialization
    void Start()
    {
        openinstall = GameObject.Find("OpenInstall").GetComponent <OpenInstall>();
        openinstall.RegisterWakeupHandler(getWakeupFinish);

        installResult = GameObject.Find("InstallText").GetComponent <Text>();
        wakeupResult  = GameObject.Find("WakeupText").GetComponent <Text>();
    }
示例#2
0
    //-------------------------------------------------------------------------
    public static OpenInstall Instant()
    {
        if (mOpenInstall == null)
        {
            mOpenInstall = new OpenInstall();
        }

        return(mOpenInstall);
    }
 // Use this for initialization
 void Start()
 {
     Debug.Log("OpenInstall Sample Start");
     openinstall = GameObject.Find("OpenInstall").GetComponent <OpenInstall>();
     // 在初始化前,需要用户阅读并同意《隐私政策》
     openinstall.Init();
     // 注册唤醒监听
     openinstall.RegisterWakeupHandler(getWakeupFinish);
     // 获取安装参数
     openinstall.GetInstall(8, getInstallFinish);
     wakeupResult  = GameObject.Find("wakeupResult").GetComponent <Text>();
     installResult = GameObject.Find("installResult").GetComponent <Text>();
 }
        static int _m_GetWakeUp_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    OpenInstall.GetWakeUp(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    OpenInstall gen_ret = new OpenInstall();
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to OpenInstall constructor!"));
        }
        static int _m_Instant_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    OpenInstall gen_ret = OpenInstall.Instant(  );
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }