public override bool GeneralFunction(int InputType, System.Action <string> _OnCallBack, params object[] paramList) { try { Logger.Log("LedouChannel GeneralFunction"); switch (InputType) { case 1: MSLDFeedbackManager.ExtraInfo extInfo = new MSLDFeedbackManager.ExtraInfo(); extInfo.level = UInt32.Parse((string)paramList[0]); extInfo.accruingAmounts = UInt32.Parse((string)paramList[1]); extInfo.consecutiveDays = UInt32.Parse((string)paramList[2]); extInfo.playerId = (string)paramList[3]; extInfo.serverId = (string)paramList[4]; extInfo.roleId = (string)paramList[5]; extInfo.extra = (string)paramList[6]; ledouSdk.ShowQuestion(extInfo, _OnCallBack); break; } } catch (System.Exception e) { Logger.Log("LedouChannel GeneralFunction error inputtype=" + InputType + " error:" + e.Message); } return(true); }
public bool ShowQuestion(MSLDFeedbackManager.ExtraInfo extInfo, System.Action <string> _OnCallBack = null) { Logger.Log("打开问卷调查! playerid:" + extInfo.playerId + " serverId:" + extInfo.serverId + " roleId:" + extInfo.roleId + " extr:" + extInfo.extra); bool isEnable = MSLDFeedbackManager.IsQuestionEnabled(); if (isEnable) { Logger.Log("支持问卷调查,准备启动窗口!"); MSLDFeedbackManager.ShowQuestion(extInfo, (MSLDErrorCode code, string msg) => { string flag = "0"; if (code == MSLDErrorCode.Success) { Logger.Log("成功!"); } else if (code == MSLDErrorCode.UIUserClose) { Logger.Log("用户关闭"); flag = "1"; } else { Logger.Log("失败! code = " + code + " msg = " + msg); flag = "-1"; } if (_OnCallBack != null) { _OnCallBack(flag); } }); } else { Logger.Log("不支持问卷调查!"); return(false); } return(true); }