// Use this for initialization void Start() { if (Application.platform == RuntimePlatform.Android) { SDKMgr.HideSplash(); } }
public static WWWForm KeyPhoto2Form <T>(IEnumerable <KeyValuePair <string, T> > enumrable, WWWForm wf = null) where T : System.IConvertible { var itor = enumrable.GetEnumerator(); if (wf == null) { wf = new WWWForm(); } string ff = ""; while (itor.MoveNext()) { string key = itor.Current.Key; string value = itor.Current.Value.ToString(null); string path = SDKMgr.get_image_path(value); ////byte[] btTex = SDKMgr.Instance.GetPictureData(path); byte[] btTex = File.ReadAllBytes(path); //Texture2D tex = itor.Current.Value as Texture2D; //byte[] btTex = tex.EncodeToPNG(); ff += key + ":" + btTex.ToString() + "\n"; wf.AddBinaryData(key, btTex); } LogMgr.D("{0}", ff); return(wf); }
protected override void AfterTween() { panelTransformationController.InitPTController(); // miniMapController.InitMiniMap(); dragController.GameOverFlag = false; dragController.GeneralDragFlag = false; SDKMgr.GetInstance().Track(SDKMsgType.OnLevelEnter, (int)levelID); }
public void showRewardVideo(Action onReward, Action onFail, Action onClose) { if (isPaid()) { onReward(); return; } SDKMgr.GetInstance().showRewardVideo(onReward, onFail, onClose); }
void Awake() { DontDestroyOnLoad(this.gameObject); mInstance = this; #if UNITY_EDITOR mSdkApi = new SDKBase(); #elif UNITY_ANDROID mSdkApi = new SDKForAndroid(); #endif }
public void Pay4RemoveAD() { if (isPaying) { //todo 此处应该有tips return; } isPaying = true; SDKMgr.GetInstance().pay4RemoveAd(); }
public bool CheckOver() { foreach (int i in playout) { if (i == (int)GridType.Blank) { return(false); } } uint curLevelID = LevelMgr.GetInstance().CurLevelID; XPlayerPrefs.DelRec(curLevelID); SDKMgr.GetInstance().Track(SDKMsgType.OnLevelClear, (int)curLevelID); return(true); }
public void InterstitialTrigger(Action onReward = null, Action onFail = null, Action onClose = null) { if (isPaid()) { if (onReward != null) { onReward(); } return; } tmpCount = XPlayerPrefs.GetInt("StartUpCount"); //int startUpCount = XPlayerPrefs.GetInt("StartUpCount"); if (startUpCount != tmpCount) { startUpCount = tmpCount; Debug.Log("StartUpCount" + startUpCount); if (startUpCount > config.Params1[config.Params1.Count - 1]) { index = config.Params1.Count - 1; } else { index = config.Params1.IndexOf(startUpCount); } Debug.Log("first" + index); playTimes = config.Params2[index]; } if (playTimes == 0) { playTimes = config.Params3[index]; } playTimes--; Debug.Log("playTimes" + playTimes); if (playTimes == 0) { //TODO:播放广告 SDKMgr.GetInstance().showIntersitialAD(onReward, onFail, onClose); #if UNITY_EDITOR Debug.Log("激励广告"); #endif } }
public override void OnExit(params object[] argv) { GameObject nextLevelButton = argv[0] as GameObject; nextLevelButton.SetActive(true); X.Res.FuncParamConfig config = FuncMgr.GetInstance().GetConfigByID(1); if (config != null) { uint curlevelid = LevelMgr.GetInstance().CurLevelID; //int showcount = XPlayerPrefs.GetInt(Evaluation_Tag); for (int i = 0; i < config.Params1.Count; i++) { if (config.Params1[i] == curlevelid /*&& config.Params2[i] > showcount*/) { SDKMgr.GetInstance().Track(SDKMsgType.OnCallEvaluation); //showcount++; //XPlayerPrefs.SetInt(Evaluation_Tag, showcount); return; } } } }
//外部消息 public void SetPackageName(string name) { //LogMgr.Log("PackageName:" + name); SDKMgr.SetPackageName(name); }
public bool isRewardVideoReady() { return(SDKMgr.GetInstance().isRewardVideoReady()); }
public void SetUp() { GameConfig.Language = SDKMgr.GetInstance().GetSystemLang(); }