本文整理汇总了C#中LuaTable.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# LuaTable.ToString方法的具体用法?C# LuaTable.ToString怎么用?C# LuaTable.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LuaTable
的用法示例。
在下文中一共展示了LuaTable.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MissionResp
public void MissionResp(byte msg, LuaTable luaTable)
{
switch (msg)
{
case (byte)MissionReq.ENTER_MISSION:
LoggerHelper.Debug("ENTER_MISSION");
int enterMissionArg1 = Convert.ToInt32(luaTable["1"]);
OnEnterMissionResp(enterMissionArg1);
break;
case (byte)MissionReq.START_MISSION:
LoggerHelper.Debug("START_MISSION");
OnStartMissionResp();
break;
case (byte)MissionReq.EXIT_MISSION:
LoggerHelper.Debug("EXIT_MISSION");
OnExitMissionResp();
break;
case (byte)MissionReq.GET_STAR_MISSION:
LoggerHelper.Debug("GET_STAR_MISSION");
OnUpdateMissionStarsResp(luaTable);
break;
case (byte)MissionReq.RESET_MISSION_TIMES:
LoggerHelper.Debug("RESET_MISSION_TIMES");
int resetMissionErrorCode = Convert.ToInt32(luaTable["1"]);
OnResetMissionTimesResp(resetMissionErrorCode);
break;
case (byte)MissionReq.GET_MISSION_TIMES:
LoggerHelper.Debug("GET_MISSION_TIMES");
OnUpdateMissionTimesResp(luaTable);
break;
case (byte)MissionReq.GET_FINISHED_MISSIONS:
LoggerHelper.Debug("GET_FINISHED_MISSIONS");
OnUpdateCharaterFinishedMissionsResp(luaTable);
break;
case (byte)MissionReq.GET_NOTIFY_TO_CLENT_EVENT:
LoggerHelper.Debug("GET_NOTIFY_TO_CLENT_EVENT");
int eventID = int.Parse(luaTable["1"].ToString());
OnNotifyToClientEventResp(eventID);
break;
case (byte)MissionReq.NOTIFY_TO_CLIENT_RESULT:
LoggerHelper.Debug("NOTIFY_TO_CLIENT_RESULT");
break;
case (byte)MissionReq.GET_MISSION_LEFT_TIME:
LoggerHelper.Debug("GET_MISSION_LEFT_TIME");
int getMissionLeftTimeArg1 = (int)luaTable["1"];
OnGetMissionLeftTimeResp(getMissionLeftTimeArg1);
break;
case (byte)MissionReq.SPAWNPOINT_START:
LoggerHelper.Debug("SPAWNPOINT_START");
OnSpawnPointStartResp();
break;
case (byte)MissionReq.SPAWNPOINT_STOP:
LoggerHelper.Debug("SPAWNPOINT_STOP");
break;
case (byte)MissionReq.NOTIFY_TO_CLIENT_RESULT_SUCCESS:
LoggerHelper.Debug("NOTIFY_TO_CLIENT_RESULT_SUCCESS");
if (theOwner.deathFlag != 0)
{
MogoUIManager.Instance.ShowMogoInstanceRebornUI(false);
MogoUIManager.Instance.ShowMogoBattleMainUI();
MainUIViewManager.Instance.ResetUIData();
}
HasWin = true;
//停托管
//MogoWorld.thePlayer.AutoFight = AutoFightState.IDLE;
var id = MissionData.GetCGByMission(MogoWorld.thePlayer.sceneId);
if (id > 0)
{
StoryManager.Instance.SetCallBack(() => { OnNotifyToClientResultSuccessResp(luaTable); });
StoryManager.Instance.PlayStory(id);
}
else
{
OnNotifyToClientResultSuccessResp(luaTable);
}
break;
case (byte)MissionReq.NOTIFY_TO_CLIENT_RESULT_FAILED:
LoggerHelper.Debug("NOTIFY_TO_CLIENT_RESULT_FAILED");
OnNotifyToClientResultFailedResp();
break;
case (byte)MissionReq.GET_MISSION_REWARDS:
//.........这里部分代码省略.........
示例2: OnGetMissionRewardResp
public void OnGetMissionRewardResp(LuaTable luaTable)
{
Mogo.Util.LoggerHelper.Debug("OnGetMissionRewardResp; " + luaTable.ToString());
int exp = Convert.ToInt32(luaTable["1"]);
int money = Convert.ToInt32(luaTable["3"]);
Dictionary<int, int> items = new Dictionary<int, int>();
List<ItemParent> theItems = new List<ItemParent>();
List<int> ids = new List<int>();
List<int> counts = new List<int>();
object obj;
if (Utils.ParseLuaTable((LuaTable)luaTable["2"], typeof(Dictionary<int, int>), out obj))
{
items = obj as Dictionary<int, int>;
foreach (KeyValuePair<int, int> item in items)
{
var temp = ItemParentData.GetItem(item.Key);
if (temp != null)
{
ids.Add(temp.id);
counts.Add(item.Value);
LoggerHelper.Debug("mission reward item : ItemID = " + item.Key + ", ItemCount = " + item.Value);
}
}
if (money > 0)
{
ids.Add(2);
counts.Add(money);
}
if (exp > 0)
{
ids.Add(1);
counts.Add(exp);
}
// InstanceUIViewManager.Instance.SetInstanceLevelRewardItemImage(iconPaths, 1);
}
// InstanceUILogicManager.Instance.SetInstanceRewardUIReward(ids, counts, itemNames);
// InstanceUILogicManager.Instance.UpdateFriendShip(theOwner.name);
InstanceUILogicManager.Instance.SetNewInstanceRewardUIReward(ids, counts);
}
示例3: OnSanctuaryDefenseRewardResp
public void OnSanctuaryDefenseRewardResp(LuaTable reward, uint week)
{
LoggerHelper.Debug("OnSanctuaryDefenseRewardResp" + reward.ToString());
List<SanctuaryRewardData> rewardData;
if (Utils.ParseLuaTable(reward, out rewardData))
{
ShowSanctuaryDefenseReward(rewardData, week, 0);
}
}
示例4: TowerResp
public void TowerResp(byte msgID, LuaTable info)
{
LoggerHelper.Warning("TowerResp" + msgID + ":" + info.ToString());
int err = 0;
switch (msgID)
{
case (byte)MsgType.MSG_GET_TOWER_INFO:
TowerData towerData;
if (Utils.ParseLuaTable(info, out towerData))
{
ClimbTowerUILogicManager.Instance.Data = towerData;
if (MogoUIManager.Instance.IsWindowOpen((int)WindowName.Tower))
{
ClimbTowerUILogicManager.Instance.RefreshUI(towerData);
}
else
{
ChallengeUILogicManager.Instance.RefreshUI((int)ChallengeGridID.ClimbTower);
}
}
break;
case (byte)MsgType.MSG_ENTER_TOWER:
Dictionary<int, int> rst;
if (Utils.ParseLuaTable(info, out rst))
{
err = rst[1];
BattleMenuUILogicManager.Instance.m_TowerFinishSingle = false;
}
break;
case (byte)MsgType.MSG_TOWER_SWEEP:
case (byte)MsgType.MSG_TOWER_VIP_SWEEP:
case (byte)MsgType.MSG_CLEAR_TOWER_SWEEP_CD:
Dictionary<int, int> rst_sweep;
if (Utils.ParseLuaTable(info, out rst_sweep))
{
err = rst_sweep[1];
}
break;
case (byte)MsgType.MSG_CLIENT_TOWER_SUCCESS:
int level = Convert.ToInt32(info["1"]) + 1;
EventDispatcher.TriggerEvent<bool, int>(Events.TowerEvent.CreateDoor, true, level);
BattleMenuUILogicManager.Instance.FinishSingle();
break;
case (byte)MsgType.MSG_CLIENT_REPORT:
{
Action act = () =>
{
MogoUIManager.Instance.OpenWindow((int)WindowName.Tower,
() =>
{
ClimbTowerUILogicManager.Instance.SetTowerGridLayout(
() =>
{
//MogoGlobleUIManager.Instance.ShowWaitingTip(true);
ClimbTowerUILogicManager.Instance.ResourceLoaded();
ReportData reportData;
if (Utils.ParseLuaTable(info, out reportData))
{
ClimbTowerUILogicManager.Instance.OpenReport(reportData);
}
EventDispatcher.TriggerEvent(Events.TowerEvent.GetInfo);
});
});
};
if (MogoUIManager.Instance.IsWindowOpen((int)WindowName.Tower))
{
ClimbTowerUILogicManager.Instance.SetTowerGridLayout(
() =>
{
//MogoGlobleUIManager.Instance.ShowWaitingTip(true);
ClimbTowerUILogicManager.Instance.ResourceLoaded();
ReportData reportData;
if (Utils.ParseLuaTable(info, out reportData))
{
ClimbTowerUILogicManager.Instance.OpenReport(reportData);
}
EventDispatcher.TriggerEvent(Events.TowerEvent.GetInfo);
});
}
else
{
MogoUIQueue.Instance.PushOne(act, MogoUIManager.Instance.m_NormalMainUI, "CLIENT_REPORT");
}
}
break;
case (byte)MsgType.MSG_TOWER_NOTIFY_COUNT_DOWN:
{
TowerInfo towerInfo;
if (Utils.ParseLuaTable(info, out towerInfo))
{
var cd = towerInfo.cd;
int hour = (int)cd / 3600;
int minute = (int)cd % 3600 / 60;
int sec = (int)cd % 60;
//.........这里部分代码省略.........
示例5: OnRankingListUpdateResp
//战斗时更新定时更新贡献排名
private void OnRankingListUpdateResp(LuaTable rank)
{
LoggerHelper.Debug("OnRankingListUpdateResp" + rank.ToString());
List<SanctuaryRankData> battleData;
if (Utils.ParseLuaTable(rank, out battleData))
{
SanctuaryUILogicManager.Instance.battleData = battleData;
SanctuaryUILogicManager.Instance.RefreshBattleUI();
}
}