本文整理汇总了Java中org.keplerproject.luajava.LuaState.getField方法的典型用法代码示例。如果您正苦于以下问题:Java LuaState.getField方法的具体用法?Java LuaState.getField怎么用?Java LuaState.getField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.keplerproject.luajava.LuaState
的用法示例。
在下文中一共展示了LuaState.getField方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onSuccess
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void onSuccess(int l, Header aheader[], byte abyte0[])
{
String s = Utils.getStringFromBytes(abyte0);
j j1;
j1 = (j)Utils.getGson().fromJson(s, cn/com/smartdevices/bracelet/lua/j);
if (j1.a != 1)
{
Debug.i("chenee", (new StringBuilder()).append("get latest luaZipFile error (message:").append(j1.b).append(")").toString());
return;
}
try
{
byte abyte1[] = Base64.decode(j1.c.b, 2);
LuaZipFile luazipfile = new LuaZipFile();
luazipfile.setVersion(j1.c.c);
luazipfile.setZipFile(abyte1);
LuaZipFileDao luazipfiledao = DaoManager.getInstance().getLuaZipFileDao();
luazipfiledao.insertOrReplace(luazipfile);
Keeper.keepLatestDBLuaVersion(j1.c.c);
Debug.i("chenee", (new StringBuilder()).append("save DB luaZipFile onSuccess====(version:").append(j1.c.c).append(")").toString());
a.resetLuaState();
LuaState luastate = a.getLuaState();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "setLocale");
luastate.pushString(Locale.getDefault().toString());
a.callLua(1, 0);
Debug.i("chenee", (new StringBuilder()).append("zipfile count:").append(luazipfiledao.count()).toString());
return;
}
catch (Exception exception)
{
Debug.e("chenee", (new StringBuilder()).append("get latest lua gson error!:").append(exception.getMessage()).toString());
}
return;
}
示例2: doLuaAction
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void doLuaAction(String s)
{
Debug.i("chenee", (new StringBuilder()).append("-------------\n").append(s).toString());
Debug.i("chenee", "--------------------\n");
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = LuaManager.getInstance().getLuaState();
luastate.LdoString(s);
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "doAction");
luastate.pushJavaObject(context);
luastate.pushJavaObject(__instance);
luamanager.callLua(2, 0);
}
示例3: callLuaFunc
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void callLuaFunc(String s, EventGameUpdate eventgameupdate)
{
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), s);
eventgameupdate.getConfigInfo().setLuaAction(context);
luastate.pushJavaObject(DaoManager.getInstance().getLuaListDao());
luastate.pushJavaObject(eventgameupdate.getConfigInfo());
luamanager.callLua(2, 0);
}
示例4: getGameInfo
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public String getGameInfo()
{
setLocale(Locale.getDefault().toString());
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "getGameInfo");
luastate.pushJavaObject(cInfo);
luamanager.callLua(1, 0);
Debug.i("LuaEvent", (new StringBuilder()).append("get lua game info =").append(cInfo.getGameInfo()).toString());
return cInfo.getGameInfo();
}
示例5: getLuaVersion
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public String getLuaVersion()
{
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "getLuaVersion");
luastate.pushJavaObject(cInfo);
luamanager.callLua(1, 0);
String s = cInfo.getLuaVersion();
Debug.i("LuaEvent", (new StringBuilder()).append("get lua version from local =").append(cInfo.getLuaVersion()).toString());
return s;
}
示例6: setGoal
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void setGoal()
{
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
de.greenrobot.daobracelet.LuaListDao lualistdao = DaoManager.getInstance().getLuaListDao();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "dayComplete");
luastate.pushJavaObject(lualistdao);
luastate.pushJavaObject(cInfo);
luamanager.callLua(2, 0);
}
示例7: setLocale
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void setLocale(String s)
{
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "setLocale");
luastate.pushString(s);
luamanager.callLua(1, 0);
}
示例8: setRecord
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void setRecord(ReportData reportdata)
{
cInfo.setNewRecordReport(reportdata);
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
de.greenrobot.daobracelet.LuaListDao lualistdao = DaoManager.getInstance().getLuaListDao();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "newRecord");
luastate.pushJavaObject(lualistdao);
luastate.pushJavaObject(cInfo);
luamanager.callLua(2, 0);
}
示例9: testAction
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void testAction()
{
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
LuaAction luaaction = LuaAction.getInstance(context);
de.greenrobot.daobracelet.LuaListDao lualistdao = DaoManager.getInstance().getLuaListDao();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "doAction2");
luastate.pushJavaObject(context);
luastate.pushJavaObject(luaaction);
luastate.pushJavaObject(lualistdao);
luamanager.callLua(3, 0);
}
示例10: luaEventAchievementMsg
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void luaEventAchievementMsg(ConfigDynamicDataInfo configdynamicdatainfo)
{
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "getAchievementMsgs");
luastate.pushJavaObject(listDao);
luastate.pushJavaObject(configdynamicdatainfo);
luamanager.callLua(2, 0);
}
示例11: luaEventActivityMsg
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void luaEventActivityMsg(ConfigDynamicDataInfo configdynamicdatainfo)
{
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "getActivityMsgs");
luastate.pushJavaObject(listDao);
luastate.pushJavaObject(configdynamicdatainfo);
luamanager.callLua(2, 0);
}
示例12: luaEventDefaultMsg
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void luaEventDefaultMsg(ConfigDynamicDataInfo configdynamicdatainfo)
{
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "getDefaultMsgs");
luastate.pushJavaObject(listDao);
luastate.pushJavaObject(configdynamicdatainfo);
luamanager.callLua(2, 0);
}
示例13: luaEventSleepMsg
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void luaEventSleepMsg(ConfigDynamicDataInfo configdynamicdatainfo)
{
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "getSleepMsgs");
luastate.pushJavaObject(listDao);
luastate.pushJavaObject(configdynamicdatainfo);
luamanager.callLua(2, 0);
}
示例14: luaEventSysInfoMsg
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void luaEventSysInfoMsg(ConfigDynamicDataInfo configdynamicdatainfo)
{
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "getSysInfoMsgs");
luastate.pushJavaObject(listDao);
luastate.pushJavaObject(configdynamicdatainfo);
luamanager.callLua(2, 0);
}
示例15: testLuaImp
import org.keplerproject.luajava.LuaState; //导入方法依赖的package包/类
public void testLuaImp(int i, ConfigDynamicDataInfo configdynamicdatainfo)
{
LuaManager luamanager = LuaManager.getInstance();
LuaState luastate = luamanager.getLuaState();
luastate.getField(LuaState.LUA_GLOBALSINDEX.intValue(), "getEventMsgs");
luastate.pushJavaObject(listDao);
luastate.pushJavaObject(configdynamicdatainfo);
luastate.pushInteger(i);
luamanager.callLua(3, 0);
}