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 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 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 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 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); }
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 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(); }
public void ShareURLSuccess(string args) { GUIRadarScan.Hide(); Globals.Instance.MGUIManager.ShowSimpleCenterTips(4012); // GUIPhotoGraph guiPhotoGraph = Globals.Instance.MGUIManager.GetGUIWindow<GUIPhotoGraph>(); // if(guiPhotoGraph != null) // { // guiPhotoGraph.SetTaskShare(); // } }
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 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 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 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); } }
/** * 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; }
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."); } }
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); } }
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 void OnPurchaseFailed(Product i, PurchaseFailureReason p) { GUIRadarScan.Hide(); Debug.Log(string.Format("OnPurchaseFailed: FAIL. Product: '{0}', PurchaseFailureReason: {1}", i.definition.storeSpecificId, p)); }
//------------------------------------------------- protected override void Awake() { if (!Application.isPlaying || null == Globals.Instance.MGUIManager) { return; } base.Awake(); base.enabled = true; UIEventListener.Get(ShopBtn.gameObject).onClick += delegate(GameObject Obj) { Globals.Instance.MGUIManager.CreateWindow <GUIClothShop>(delegate(GUIClothShop ClothShop) { UISprite exitBtn = ClothShop.HomeBtn.gameObject.GetComponent <UISprite>(); // exitBtn.spriteName = "ButtonFanhui3Normol"; // ClothShop.HomeBtn.normalSprite = "ButtonFanhui3Normol"; // ClothShop.HomeBtn.hoverSprite = "ButtonFanhui3Normol"; // ClothShop.HomeBtn.pressedSprite = "ButtonFanhui3Normol"; // ClothShop.HomeBtn.disabledSprite = "ButtonFanhui3Normol"; Globals.Instance.MSceneManager.ChangeCameraActiveState(SceneManager.CameraActiveState.MAINCAMERA); NetSender.Instance.C2GSRequestShopItems(Globals.Instance.mShopDataManager.ShopID, (int)Globals.Instance.MGameDataManager.MActorData.BasicData.Gender); ResetAllTweener(); NGUITools.SetActive(this.gameObject, false); ClothShop.CloseShopEvent += delegate() { if (GameStatusManager.Instance.MCurrentGameStatus == GameStatusManager.Instance.MPortStatus) { GUIMain main = Globals.Instance.MGUIManager.GetGUIWindow <GUIMain>(); if (main != null) { main.SetVisible(false); } } Globals.Instance.MSceneManager.ChangeCameraActiveState(SceneManager.CameraActiveState.TASKCAMERA); UpdataList(); NGUITools.SetActive(this.gameObject, true); SetTweenActive(CMFMove, true, null); }; }); }; UIEventListener.Get(BackToClothBtn.gameObject).onClick += delegate(GameObject Obj) { GUIRadarScan.Show(); Globals.Instance.MGUIManager.CreateWindow(delegate(GUIChangeCloth changeCloth) { GUIRadarScan.Hide(); this.IsReturnMainScene = false; this.Close(); }); }; UIEventListener.Get(BoyBtn.gameObject).onClick += delegate(GameObject Obj) { SetTweenActive(CMFMove, false, null); DisplayClothList(ClothType.BOY); }; UIEventListener.Get(GirlBtn.gameObject).onClick += delegate(GameObject Obj) { SetTweenActive(CMFMove, false, null); DisplayClothList(ClothType.GIRL); }; UIEventListener.Get(OtherBtn.gameObject).onClick += delegate(GameObject Obj) { SetTweenActive(CMFMove, false, null); DisplayClothList(ClothType.OTHER); }; UIEventListener.Get(BackBtn.gameObject).onClick += OnClickBackBtn; UIEventListener.Get(BackBtn1.gameObject).onClick += OnClickBackBtn; UIEventListener.Get(ExitBtn.gameObject).onClick += delegate(GameObject Obj) { this.Close(); }; UIEventListener.Get(GiftClothBtn.gameObject).onClick += delegate(GameObject Obj) //赠送// { NGUITools.SetActive(BackToClothBtn.gameObject, false); NGUITools.SetActive(ShopBtn.gameObject, false); NGUITools.SetActive(ExitBtn.gameObject, false); NGUITools.SetActive(WealthGroup, false); NGUITools.SetActive(BackBtn.gameObject, false); mCurrentStatus = Status.SEND; //注意这句代码的位置// if (mCurrentBagData.bNeedReduce == true) { MaxSailNum = mCurrentBagData.itemSlotData.MItemData.BasicData.Count - 1; } else { MaxSailNum = mCurrentBagData.itemSlotData.MItemData.BasicData.Count; } SailNum = 1; SetTweenActive(ClothInfoMationFrame, false, null); SetTweenActive(CLFMove, false, null); SetTweenActive(FFMoveScrollView, true, null); }; UIEventListener.Get(SailBtn.gameObject).onClick += delegate(GameObject Obj) //卖// { mCurrentStatus = Status.SELL; //注意这句代码的位置// if (mCurrentBagData.bNeedReduce == true) { MaxSailNum = mCurrentBagData.itemSlotData.MItemData.BasicData.Count - 1; } else { MaxSailNum = mCurrentBagData.itemSlotData.MItemData.BasicData.Count; } SailNum = 1; SetTweenActive(ClothInfoMationFrame, false, null); NGUITools.SetActive(ForbitBtn.gameObject, true); SetTweenActive(NoteFrame, true, delegate() { CancelBtn.isEnabled = true; EnterBtn.isEnabled = true; }); SetTweenActive(CLFMove, false, null); }; UIEventListener.Get(AddBtn.gameObject).onClick += delegate(GameObject Obj) { SailNum++; }; UIEventListener.Get(SubtractBtn.gameObject).onClick += delegate(GameObject Obj) { SailNum--; }; UIEventListener.Get(EnterBtn.gameObject).onClick += delegate(GameObject Obj) { EnterBtn.isEnabled = false; CancelBtn.isEnabled = false; mCurrentBagData.itemSlotData.MItemData.BasicData.Count = SailNum; if (mCurrentStatus == Status.SELL) { NetSender.Instance.RequestSellItem(mCurrentBagData.itemSlotData); } else if (mCurrentStatus == Status.SEND) { } SetTweenActive(NoteFrame, false, delegate(){ NGUITools.SetActive(ForbitBtn.gameObject, false); }); NGUITools.SetActive(WealthGroup, true); //SetTweenActive(CMFMove,true); }; UIEventListener.Get(CancelBtn.gameObject).onClick += delegate(GameObject Obj) { CancelBtn.isEnabled = false; EnterBtn.isEnabled = false; SetTweenActive(NoteFrame, false, delegate() { NGUITools.SetActive(ForbitBtn.gameObject, false); NGUITools.SetActive(ShopBtn.gameObject, true); NGUITools.SetActive(ExitBtn.gameObject, true); NGUITools.SetActive(WealthGroup, true); }); SetTweenActive(CLFMove, true); SetTweenActive(ClothInfoMationFrame.gameObject, true); SetTweenActive(NoteFrame, false, delegate(){ NGUITools.SetActive(ForbitBtn.gameObject, false); }); }; CLFScrollView.onDragFinished = OnScrollViewFinished; SetTweenActive(CMFMove, true, null); }
public void SharePhotoFail(string args) { GUIRadarScan.Hide(); Globals.Instance.MGUIManager.ShowSimpleCenterTips(4013); }
public void EnterWelcomGUI() { GUIRadarScan.Hide(); SwitchToPanel(ChildPanelType.Welcom); PlayGame(); }
public void AliPaySuccess() { GUIRadarScan.Hide(); }
public void enterAccountGUI() { GUIRadarScan.Hide(); SwitchToPanel(ChildPanelType.Welcom); }
public void SavePhotoFailed(string args) { GUIRadarScan.Hide(); Globals.Instance.MGUIManager.ShowSimpleCenterTips(10012); }