using System; using System.Collections.Generic; using UnityEngine; namespace MMO { public class MMOInnerSDKManager : MMOSingleton { public Action> DelShowRV; public Action DelShowIV; public Action DelLogEvent; public Func DelGetConfig; public Action DelShare; public Action DelOpenMoreGames; public void ShowRV(string pAdPos, Action pDelResult) { DelShowRV?.Invoke(pAdPos, pDelResult); } public void ShowIV(string pAdPos) { DelShowIV?.Invoke(pAdPos); } public void LogEvent(string pEvent) { DelLogEvent?.Invoke(pEvent, "Robux", "Robux"); } public string GetConfigString(string pKey) { return GetConfig(pKey); } public int GetConfigInt(string pKey) { int tVal = 0; int.TryParse(GetConfig(pKey), out tVal); return tVal; } public bool GetConfigBool(string pKey) { return GetConfigInt(pKey) == 1; } private string GetConfig(string pKey) { return DelGetConfig?.Invoke(pKey); } public void Share(string pContent) { DelShare?.Invoke(pContent); } public void OpenMoreGames() { DelOpenMoreGames?.Invoke(); } #region convenient log public void LogRobuxAction(string pValue) { DelLogEvent?.Invoke(MMOEventID.RobuxAction, MMOEventKey.Redeem, pValue); } public void LogUserType(string pValue) { DelLogEvent?.Invoke(MMOEventID.UserType, MMOEventKey.UserType, pValue); } public void LogUserGender(string pValue) { DelLogEvent?.Invoke(MMOEventID.UserGender, MMOEventKey.Gender, pValue); } public void LogInviteAction(string pValue) { DelLogEvent?.Invoke(MMOEventID.InviteAction, MMOEventKey.Invite, pValue); } public void LogInviteNum(string pKey, int pValue) { DelLogEvent?.Invoke(MMOEventID.InviteNum, pKey, pValue.ToString()); } public void LogResultPage(string pValue) { DelLogEvent?.Invoke(MMOEventID.ResultPage, MMOEventKey.Result, pValue); } public void LogInstallRV(string pValue) { DelLogEvent?.Invoke(MMOEventID.InstallRV, MMOEventKey.InstallRV, pValue); } public void LogClaimSkin(string pValue) { DelLogEvent?.Invoke(MMOEventID.ClaimSkin, MMOEventKey.ClaimSkin, pValue); } #endregion } }