public void OnClickButtonFuzhaungdian(GameObject obj) { PlayerData playerData = Globals.Instance.MGameDataManager.MActorData; GUIRadarScan.Show(); NetSender.Instance.C2GSRequestShopItems(510, (int)playerData.BasicData.Gender); }
private List <int> GetSinglePlaceJobList(int placeID) { if (!CacheJobPlace.ContainsKey(placeID) || CacheJobPlace[placeID].Count <= 0) { GUIRadarScan.Show(); List <int> mList = jobConfig.GetJobSingleElementList(placeID); CacheJobPlace.Add(placeID, mList); NetSender.Instance.C2GSModifyJobListReq(CacheJobPlace, playerData.starData.nLineDay); GUIRadarScan.Hide(); return(mList); } foreach (KeyValuePair <int, List <int> > mPair in CacheJobPlace) { if (placeID == mPair.Key) { return(mPair.Value); } } return(null); }
public void ShareGameUrl(string args) { ParseReceiveParams(args); string result = GetReceiveParam(KeyResult); Debug.Log("SavePhoto result is " + result); GUIRadarScan.Hide(); if (result == "true" || result == "1") { Debug.Log("ShowSimpleCenterTips 4012"); Globals.Instance.MGUIManager.ShowSimpleCenterTips(4012); // GUIPhotoGraph guiPhotoGraph = Globals.Instance.MGUIManager.GetGUIWindow<GUIPhotoGraph>(); // if(guiPhotoGraph != null) // { // guiPhotoGraph.SetTaskShare(); // } } else { Debug.Log("ShowSimpleCenterTips 4013"); string error = GetReceiveParam(KeyError); //Globals.Instance.MGUIManager.ShowSimpleCenterTips(error); Globals.Instance.MGUIManager.ShowSimpleCenterTips(4013); } }
public void SharePhoto(string args) { ParseReceiveParams(args); string result = GetReceiveParam(KeyResult); Debug.Log("SavePhoto result is " + result); GUIRadarScan.Hide(); if (result == "true" || result == "1") { Debug.Log("ShowSimpleCenterTips 4012"); Globals.Instance.MGUIManager.ShowSimpleCenterTips(4012); if (Globals.Instance.MTaskManager.IsGetShareReward && Globals.Instance.MGameDataManager.MActorData.starData.appStoreTapJoyState) { GUIRadarScan.Show(); NetSender.Instance.ShareCountInfoReq(1); } } else { Debug.Log("ShowSimpleCenterTips 4013"); string error = GetReceiveParam(KeyError); //Globals.Instance.MGUIManager.ShowSimpleCenterTips(error); Globals.Instance.MGUIManager.ShowSimpleCenterTips(4013); } }
public void selectImageDataAsAvatar(string args) { ParseReceiveParams(args); //string result = GetReceiveParam(KeyResult); string error = GetReceiveParam(KeyError); Debug.Log("[U3dAppReceiver]: selectImageDataAsAvatar------------------- the error is " + error); if ("Success" == error) { string iamgeData = GetReceiveParam(KeyImageData); Debug.Log("[U3dAppReceiver]: imageData is " + iamgeData); GUICreateRole guicreateRole = Globals.Instance.MGUIManager.GetGUIWindow <GUICreateRole>(); if (guicreateRole) { guicreateRole.updateAvatar(iamgeData); } } else { GUIRadarScan.Hide(); //GUIVipStore.inRechargeing = false; } }
public void paymentNotify(string args) { ParseReceiveParams(args); string result = GetReceiveParam(KeyResult); string error = GetReceiveParam(KeyError); Debug.Log("[U3dAppReceiver]: paymentNotify------------------- the result is " + result); Debug.Log("[U3dAppReceiver]: paymentNotify------------------- the error is " + error); if ("Success" == error) { string productID = GetReceiveParam(KeyProductId); string changeIdentity = GetReceiveParam(KeyOrderId); string changeReceipt = GetReceiveParam(KeyPayDescription); Debug.Log("[U3dAppReceiver]: productID is " + productID); Debug.Log("[U3dAppReceiver]: changeIdentity is " + changeIdentity); Debug.Log("[U3dAppReceiver]: changeReceipt is " + changeReceipt); ShopDataManager.AddPendingOrderId(ShopDataManager.PayCommodityData.orderId, GameDefines.PlatformApp, changeIdentity, changeReceipt); NetSender.Instance.RequestAppStoreChargeConfirm(ShopDataManager.PayCommodityData.orderId, changeReceipt, changeIdentity); } else { GUIRadarScan.Hide(); //GUIVipStore.inRechargeing = false; } }
public bool GoToTalk(int key, TaskDelegate callback) { return(false); TaskConfig taskConfig = Globals.Instance.MDataTableManager.GetConfig <TaskConfig>(); Dictionary <int, TaskConfig.TaskObject> taskObjectDic; taskConfig.GeTaskObjectList(out taskObjectDic); int taskid = -1; TALKSTATE state = TALKSTATE.BEFORE; for (int i = 0; i < Globals.Instance.MTaskManager._mUnfinishList.Count; i++) { TaskData taskData = Globals.Instance.MTaskManager._mUnfinishList[i]; if (taskData.IsTaskDaily) { continue; //xiu gai ren wu wu fa ti jiao; 20121009 //break; } //if( Globals.Instance.MGameDataManager.MCurrentPortData.PortID == taskObjectDic[taskData.Task_ID].Complete_Task_SeaID) { if (taskData != null && taskData.State == TALKSTATE.COMPLETE) { taskid = taskData.Task_ID; } } } for (int i = 0; i < Globals.Instance.MTaskManager._mCanAcceptList.Count; i++) { if (!taskObjectDic.ContainsKey(Globals.Instance.MTaskManager._mCanAcceptList[i])) { continue; } //if( Globals.Instance.MGameDataManager.MCurrentPortData.PortID == taskObjectDic[Globals.Instance.MTaskManager._mCanAcceptList[i]].Before_Task_SeaID) { taskid = Globals.Instance.MTaskManager._mCanAcceptList[i]; } } if (taskid == -1) { return(false); } Globals.Instance.MTaskManager.mCurTaskId = taskid; GUIRadarScan.Show(); Globals.Instance.MGUIManager.CreateWindow <GUITaskTalkView>( delegate(GUITaskTalkView gui) { GUIRadarScan.Hide(); gui.UpdateData(taskid, delegate(){ callback(); }); } ); return(true); }
private void OnClickPlayBtn(GameObject obj) { GUIRadarScan.Show(); string account = ""; string password = ""; // Enter the user srp6 test and verify workflow if (string.IsNullOrEmpty(GameDefines.Setting_LoginName)) { GameDefines.Setting_IsGuest = true; GameDefines.TempSetting_LoginName = account; GameDefines.TempSetting_LoginPass = password; Globals.Instance.MLSNetManager.RequestLoginChallenge("", ""); } else { account = GameDefines.Setting_LoginName; password = GameDefines.Setting_LoginPass; GameDefines.Setting_IsGuest = false; //GameDefines.Setting_LogingServer = mServer.name; GameDefines.TempSetting_LoginName = account; GameDefines.TempSetting_LoginPass = password; Globals.Instance.MLSNetManager.RequestLoginChallenge(account, password, 0); } //bannerView.Destroy(); }
private void TaskAcceptDeal(int taskid) { TaskConfig.TaskObject element = null; TaskConfig task = Globals.Instance.MDataTableManager.GetConfig <TaskConfig>(); bool hasData = task.GetTaskObject(taskid, out element); if (!hasData) { return; } GUIGuoChang.Show(); if (element.Progress_Count <= 0) { GUIRadarScan.Show(); if (element.Is_End == 1) { if (element.Is_Perfect_End == 1) { NetSender.Instance.RequestTaskCompleteReq(taskid); } else { GUITaskTalkView taskview = Globals.Instance.MGUIManager.GetGUIWindow <GUITaskTalkView>(); if (taskview != null) { taskview.DestroyThisGUI(); } Globals.Instance.MGUIManager.CreateWindow <GUIGameOutcome>(delegate(GUIGameOutcome guiGameOutcome) { guiGameOutcome.EnterGameOutcome(taskid); GUIGuoChang.SetTweenPlay(0, delegate() {}); }); } } else { NetSender.Instance.RequestTaskCompleteReq(taskid); } } else { GUITaskTalkView taskview = Globals.Instance.MGUIManager.GetGUIWindow <GUITaskTalkView>(); if (taskview != null) { taskview.DestroyThisGUI(); } Globals.Instance.MGUIManager.CreateWindow <GUIPhotoGraph>(delegate(GUIPhotoGraph gui) { GUIGuoChang.SetTweenPlay(0, delegate() { // EliminationMgr.Instance.GameFieldAnimationEndStartGame (); }); GUIMain guimain = Globals.Instance.MGUIManager.GetGUIWindow <GUIMain>(); if (guimain != null) { guimain.SetVisible(false); } gui.DrawReadyView(); }); } }
public static void AppSavePhoth(string strAddr) { if (GameDefines.OutputVerDefs == OutputVersionDefs.AppStore) { GUIRadarScan.Show(); U3dSavePhoth(strAddr); } }
public override void InitBattleData() { GUIRadarScan.Hide(); BeginBattleLogic(); _mBattleState = EBattleState.DO_STEP; }
public override void Initialize() { GUIRadarScan.Hide(); // tzz added // close the EXIT_COPY dialog to prevent from click ok to send exit copy scene // GUIDialog.Destroy(); }
private void PressedBuildingLableItemButton(GameObject obj) { UIImageButton btn = obj.transform.GetComponent <UIImageButton>(); sg.GS2C_Buildings_Res.Buildings_Mes userData = (sg.GS2C_Buildings_Res.Buildings_Mes)btn.Data; switch (userData.id) { ///学习// case 1: case 2: Globals.Instance.mShopDataManager.InStudy = userData.param; break; //打工// case 3: int buildingID = Globals.Instance.MNpcManager.getCurrentInteractBuildingLogicID(); GUIRadarScan.Show(); NetSender.Instance.C2GSRequestIndustryList(buildingID); break; //商店// case 4: case 5: // Globals.Instance.mShopDataManager.ShopPushGoodsID = Globals.Instance.mShopDataManager.SHOP; // Globals.Instance.mShopDataManager.ShopPushGoodsVL = userData.param; // NetSender.Instance.RequestShopPushGoods(5021); NetSender.Instance.C2GSRequestShopItems(userData.param, -1); bool isPushData = Globals.Instance.MPushDataManager.GetItemData(Push_Tpye.SHOP_PUSH, userData.param) == null ? false:true; if (isPushData) { NetSender.Instance.RequestReadPushData((int)Push_Tpye.SHOP_PUSH, userData.param); } break; ///进入宿舍/// case 6: Globals.Instance.MLSNetManager.RequestRoomInfo(); break; //打开世界地图// case 8: { long ActorID = Globals.Instance.MGameDataManager.MActorData.PlayerID; NetSender.Instance.RequestMapInfo(ActorID); GUIRadarScan.Show(); this.Close(); Globals.Instance.MNpcManager.PlayeCameraAnimatonReturn(); Globals.Instance.MNpcManager.SetPlayerFace(true); } break; } }
void ReceivePurchaseFail(string args) { if (!string.IsNullOrEmpty(args)) { // UIWindowMgr.showTips(args); Globals.Instance.MGUIManager.ShowSimpleCenterTips(args); } // UIWindowMgr.hideWaiting(); GUIRadarScan.Hide(); Debug.Log("ReceivePurchaseFail = " + args); }
public void ShareURLSuccess(string args) { GUIRadarScan.Hide(); Globals.Instance.MGUIManager.ShowSimpleCenterTips(4012); // GUIPhotoGraph guiPhotoGraph = Globals.Instance.MGUIManager.GetGUIWindow<GUIPhotoGraph>(); // if(guiPhotoGraph != null) // { // guiPhotoGraph.SetTaskShare(); // } }
public void OnClickAddStepBtn(GameObject obj) { if (Globals.Instance.MGameDataManager.MActorData.WealthData.GoldIngot < 50) { Globals.Instance.MGUIManager.PopupNotEnoughDiamond(); } else { GUIRadarScan.Show(); NetSender.Instance.C2GSEliminationAddStepReq(); } }
public void SharePhotoSuccess(string args) { GUIRadarScan.Hide(); Globals.Instance.MGUIManager.ShowSimpleCenterTips(4012); Debug.Log("BOOL" + Globals.Instance.MTaskManager.IsGetShareReward); Debug.Log("BOOL" + Globals.Instance.MGameDataManager.MActorData.starData.appStoreTapJoyState); if (Globals.Instance.MTaskManager.IsGetShareReward && Globals.Instance.MGameDataManager.MActorData.starData.appStoreTapJoyState) { GUIRadarScan.Show(); NetSender.Instance.ShareCountInfoReq(1); } }
public void SavePhoto(string args) { ParseReceiveParams(args); string result = GetReceiveParam(KeyResult); Debug.Log("SavePhoto result is " + result); GUIRadarScan.Hide(); if (result == "true" || result == "1") { Debug.Log("ShowSimpleCenterTips 4011"); Globals.Instance.MGUIManager.ShowSimpleCenterTips(4011); } }
public void SavePhotoSucess(string args) { GUIRadarScan.Hide(); if (args.Contains("failed")) { Globals.Instance.MGUIManager.ShowSimpleCenterTips(10013); } else { Debug.Log("SavePhotoSucess!!!!!!!!!!!!!"); Globals.Instance.MGUIManager.ShowSimpleCenterTips(4011); } }
/// <summary> /// 购买商品 /// </summary> /// <param name="priductid">商品ID</param> static public void BuyProductClick(string priductid, string orderid) { if (!IsProductAvailable()) { // UIWindowMgr.showTips("无法购买此商品!请联系客服!"); // UIWindowMgr.hideWaiting(); Globals.Instance.MGUIManager.ShowSimpleCenterTips("无法购买此商品!请联系客服!"); GUIRadarScan.Hide(); } else { //产品id,此处id要和apple开发者后台产品id相同,每个产品id用\t相隔 RequstProductInfo(priductid, orderid); } }
public void ToLoading() { Debug.Log("Unity... ToLoading"); isAnimationOn = false; if (m_bufferLoginProofPacket != null) { Globals.Instance.MLSNetManager.ReceiveLoginProofNew(m_bufferLoginProofPacket); m_bufferLoginProofPacket = null; } else { GUIRadarScan.Show(); } }
/** * by lsj for the case of port defense battle */ public virtual void InitBattleData() { GUIRadarScan.Hide(); // !!!! follow 3 function order can't be changed !!!! InitCameraPos(); BeginBattleLogic(); PlayBattleCameraTrack(); // tzz added for create the selected prefab effection // if (m_battleSelectedPrefab != null) { GameObject.Destroy(m_battleSelectedPrefab); } Object t_obj = Resources.Load(BattleShipSelectedPrefab); m_battleSelectedPrefab = GameObject.Instantiate(t_obj) as GameObject; m_battleSelectedPrefab.SetActiveRecursively(false); GameObject.DontDestroyOnLoad(m_battleSelectedPrefab); // start create // Add Finger event Globals.Instance.MFingerEvent.Add3DEventListener(this); this.SetFingerEventActive(true); // Add sneak attack effect if (_battleResult.SneakAttackType != GameData.BattleGameData.SneakAttackType.FACE_ATTACK) { Globals.Instance.M3DItemManager.PlaySneakEffect(_battleResult, null); } if (CustomCameraState) { Globals.Instance.MCamTrackController.StopTrack(FightCameraTrack); KeyFrameInfo[] t_cameraInfo = m_battleCameraTrack.keyFrameInfos; KeyFrameInfo t_endPos = t_cameraInfo[t_cameraInfo.Length - 1]; CameraTrack.ITweenMoveTo(Globals.Instance.MSceneManager.mMainCamera.gameObject, t_endPos, null, 1.0f); } _mBattleState = EBattleState.DO_STEP; }
public void adVideoPlayFinished(string args) { ParseReceiveParams(args); string result = GetReceiveParam(KeyResult); Debug.Log("adVideoPlayFinished result is " + result); if (result == "true" || result == "1") { GUIRadarScan.Show(); NetSender.Instance.AdvertisingAwardsReq(); } else { Globals.Instance.MGUIManager.ShowSimpleCenterTips(4023); } SoundManager.CurrentPlayingMusicAudio.Play(); }
void paymentNotify(string args) { ParseReceiveParams(args); string result = GetReceiveParam(KeyResult); string error = GetReceiveParam(KeyError); Debug.Log("[U3dAppReceiver]: paymentNotify------------------- the result is " + result); Debug.Log("[U3dAppReceiver]: paymentNotify------------------- the error is " + error); if ("Success" == error) { string productID = GetReceiveParam(KeyProductId); string changeIdentity = GetReceiveParam(KeyIosOrderId); string changeReceipt = GetReceiveParam(KeyPayDescription); string keyOrderId = GetReceiveParam(KeyOrderId); Debug.Log("[U3dAppReceiver]: productID is " + productID); Debug.Log("[U3dAppReceiver]: changeIdentity is " + changeIdentity); Debug.Log("[U3dAppReceiver]: changeReceipt is " + changeReceipt); Debug.Log("[U3dAppReceiver]: keyOrderId is " + keyOrderId); if (keyOrderId != null && keyOrderId != "") { ShopDataManager.AddPendingOrderId(keyOrderId, GameDefines.OutPutChannelsIdentity, changeIdentity, changeReceipt); NetSender.Instance.RequestAppStoreChargeConfirm(keyOrderId, changeReceipt, changeIdentity); } else { ShopDataManager.AddPendingOrderId(ShopDataManager.PayCommodityData.orderId, GameDefines.OutPutChannelsIdentity, changeIdentity, changeReceipt); NetSender.Instance.RequestAppStoreChargeConfirm(ShopDataManager.PayCommodityData.orderId, changeReceipt, changeIdentity); } } else { // UIWindowMgr.hideWaiting(); GUIRadarScan.Hide(); } }
public void BuyProductID(string productId) { if (IsInitialized()) { Product product = m_StoreController.products.WithID(productId); if (product != null && product.availableToPurchase) { Debug.Log(string.Format("Purchasing product asychronously: '{0}'", product.definition.id)); m_StoreController.InitiatePurchase(product); } else { GUIRadarScan.Hide(); Debug.Log("BuyProductID: FAIL. Not purchasing product, either is not found or is not available for purchase"); } } else { GUIRadarScan.Hide(); Debug.Log("BuyProductID FAIL. Not initialized."); } }
IEnumerator InvokeAndroidCameraSaveDelegate() { yield return(new WaitForSeconds(0.2f)); // 最后将这些纹理数据,成一个png图片文件 // byte[] bytes = texture2d.EncodeToPNG(); string cptrAddr = "Screenshot" + System.DateTime.Now.Second.ToString() + ".png"; string filename = Application.persistentDataPath + "/" + cptrAddr; try { System.IO.File.WriteAllBytes(filename, bytes); Debug.Log(string.Format("截屏了一张照片: {0}", filename)); AndroidSDKAgent.SavePhoto(filename, cptrAddr); Debug.Log("----------------------" + filename); } catch { GUIRadarScan.Hide(); Globals.Instance.MGUIManager.ShowSimpleCenterTips(10012); } yield return(0); }
public bool HandleNotEnoughMoney(int needVal) { int currVal = Globals.Instance.MGameDataManager.MActorData.WealthData.Money; if (currVal < needVal) { this.CreateGUIDialog(delegate(GUIDialog gui) { gui.SetTextAnchor(ETextAnchor.MiddleCenter, false); gui._mTipsTextST.text = Globals.Instance.MDataTableManager.GetWordText(22600096); gui.GetOKBtn().GetComponent <GUIText>().text = Globals.Instance.MDataTableManager.GetWordText(23800003); }, EDialogStyle.DialogOkCancel, delegate() { NetSender.Instance.RequestHasGift(); NetSender.Instance.RequestHasGift(); GUIRadarScan.Show(); Globals.Instance.MGUIManager.mReserveOpenYuanbaoDuiHuan = true; }); return(true); } return(false); }
public static void PayForCommodity(CommodityData data) { Statistics.INSTANCE.CustomEventCall(Statistics.CustomEventType.WantToPay, "ItemID", data.BasicData.LogicID, "Amount", data.BasicData.Count, "Price", data.currPrice); if (GameDefines.OutputVerDefs == OutputVersionDefs.Windows) { GUIRadarScan.Hide(); } else if (GameDefines.OutputVerDefs == OutputVersionDefs.AppStore) { U3dIOSSendToSdk.BuyProductClick(data.CommodityStr, data.orderId); Debug.Log("CommodityStr is " + data.CommodityStr); } else if (GameDefines.OutputVerDefs == OutputVersionDefs.WPay) { GooglePayment.Instance.BuyProductID(data.CommodityStr); Debug.Log("orderId is " + data.orderId); Debug.Log("CommodityStr is " + data.CommodityStr); } else { Globals.Instance.MGUIManager.ShowSimpleCenterTips(20000019, true); } }
private void OnPressedCameraSaveBtnBtn(GameObject obj) { // 最后将这些纹理数据,成一个png图片文件 byte[] bytes = texture2d.EncodeToPNG(); string cptrAddr = "Screenshot" + System.DateTime.Now.Second.ToString() + ".png"; string filename = Application.persistentDataPath + "/" + cptrAddr; System.IO.File.WriteAllBytes(filename, bytes); Debug.Log(string.Format("截屏了一张照片: {0}", filename)); if (GameDefines.OutputVerDefs == OutputVersionDefs.AppStore) { GUIRadarScan.Show(); //U3dAppStoreSender.AppSavePhoth(filename); } else if (GameDefines.OutputVerDefs == OutputVersionDefs.WPay) { GUIRadarScan.Show(); StartCoroutine(InvokeAndroidCameraSaveDelegate()); } }
private void FristCacheJobListInfor() { CacheJobPlace.Clear(); if (Globals.Instance.MJobManager.getJobPlaceInformationDic.Count <= 0) { GUIRadarScan.Show(); NetSender.Instance.C2GSReadJobListReq(); } else { foreach (KeyValuePair <int, List <int> > mJobPlace in Globals.Instance.MJobManager.getJobPlaceInformationDic) { List <int> jobList = new List <int>(); foreach (int va in mJobPlace.Value) { jobList.Add(va); } CacheJobPlace.Add(mJobPlace.Key, jobList); } ShowJobPlaceInfor(); } }