private void ShowRewardKey(GoodsType goods, int count, Vector3 startPos) { if (goods != GoodsType.KEY) { return; } int effectNum = count > m_RewardEffectNum || count < 0 ? m_RewardEffectNum : count; CommonUI commonUI = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel); if (commonUI != null) { m_IdEffectCountDic[goods] += effectNum; //tokenUi.UnLockById(goods, false, false); for (int i = 0; i < effectNum; i++) { var rewardEffect = RewardKey.GetInstance(); float radius = 0f; if (effectNum > 1) { radius = Random.Range(m_RewardEffectRadius * 0.2f, m_RewardEffectRadius); } float angle = (float)Random.Range(0, 360); float x = radius * Mathf.Cos(angle); float y = radius * Mathf.Sin(angle); Vector3 effectPos = new Vector3(startPos.x + x, startPos.y + y, startPos.z); rewardEffect.Init(effectPos, startPos, this, commonUI); } } }
private void OnClickGetLDA() { //InfoCLogUtil.instance.SendClickLog(ClickEnum.MAIN_LEVEL_DETAIL_AWARD); if (m_LevelDetailDTO != null) { int times = 1; QuestItem questCfg = Global.gApp.gGameData.QuestData.Get(m_LevelDetailDTO.id); ItemDTO itemDTO = new ItemDTO(Convert.ToInt32(questCfg.award[0]), questCfg.award[1] * times, BehaviorTypeConstVal.OPT_LEVEL_DETAIL); itemDTO.param3 = m_LevelDetailDTO.id; CommonUI commonUi = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel); if (commonUi != null) { //commonUi.UnLockById(itemDTO.itemId, false, false); } Global.gApp.gUiMgr.OpenPanel <ItemDTO>(Wndid.OpenBoxUI, itemDTO); //Global.gApp.gMsgDispatcher.Broadcast<bool>(MsgIds.HideGameGuideAD, false); //Global.gApp.gUiMgr.OpenPanel<QuestItemDTO>(Wndid.GetMoneyUI, levelDetailDTO); } else { Global.gApp.gUiMgr.OpenPanel <ItemItem>(Wndid.NextDayWeaponUi, m_LDAGunCfg); } //Global.gApp.gUiMgr.OpenPanel<ItemItem>(Wndid.NextDayWeaponUi, m_NextGunCfg); }
private void SetRedHeartShow(bool enable) { CommonUI commonUI = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel); if (commonUI != null) { //commonUI.SetHeartNodeEnable(enable); } }
public void Init(Vector3 pos, Vector3 startPos, RewardEffectUi parent, CommonUI commonUI) { //this.goods = goods; m_Parent = parent; m_CommonUI = commonUI; //InitIcon(goods); GetComponent <RectTransform>().position = startPos; gameObject.SetActive(true); InitLockPos(goods, pos); }
public override void Init <T>(string name, UIInfo info, T arg) { base.Init(name, info, arg); CommonUI commonui = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel); if (commonui != null) { commonui.SetOrderLayer(30); } OnExChangeMat(); UIFresh(); base.ChangeLanguage(); }
public override void Recycle() { base.Recycle(); UnregisterListeners(); CommonUI commonUi = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel); commonUi.ResetOrderLayer(); TokenUI tokenUi = Global.gApp.gUiMgr.GetPanelCompent <TokenUI>(Wndid.TokenUI); tokenUi?.SetAddGoldValid(true); Global.gApp.gMainRoleUI.RemoveDragCtrl(); Global.gApp.gMainRoleUI.Hide(); CloseSubPanels(); }
public override void Release() { base.Release(); UnregisterListeners(); CommonUI commonUi = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel); commonUi.ResetOrderLayer(); TokenUI tokenUi = Global.gApp.gUiMgr.GetPanelCompent <TokenUI>(Wndid.TokenUI); tokenUi?.SetAddGoldValid(true); if (gameObject.activeSelf) { Global.gApp.gMainRoleUI.Hide(); } CloseSubPanels(); }
public override void Release() { CommonUI commonui = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel); if (commonui != null) { commonui.ResetOrderLayer(); } UnRegisterListeners(); if (m_WeaponNode != null) { m_WeaponNode.Destroy(); } if (m_ExchangeNode != null) { m_ExchangeNode.Destroy(); } base.Release(); }
private void ReceiveAward(int times) { m_ItemDTO = new ItemDTO(SpecialItemIdConstVal.GOLD, mCoin * times, BehaviorTypeConstVal.OPT_RECEIVE_SUPPLY); m_ItemDTO.paramStr1 = times.ToString(); CommonUI commonUi = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel); if (commonUi != null) { //commonUi.UnLockById(m_ItemDTO.itemId, false, false); } GameItemFactory.GetInstance().AddItem(m_ItemDTO); //Tweener tweener = airdropicon_close.rectTransform.DOShakeScale(1f, new Vector3(0.2f, 0.2f, 0.2f), 6, 90); Tweener tweener = airdropicon_close.rectTransform.DOPunchRotation(new Vector3(0, 0, 7), 0.6f, 40, 1); tweener.SetEase(Ease.OutElastic); tweener.SetLoops(1); tweener.OnComplete(CompleteOpen); tweener.Play(); }
public override void Init <T>(string name, UIInfo info, T arg) { base.Init(name, info, arg); Global.gApp.gMainRoleUI.Show(); var dragRoleModel = RotateNode.gameObject.GetComponent <DragRoleModel>(); Global.gApp.gMainRoleUI.AddDragCtrl(dragRoleModel); RefreshMainWeaponData(); RefreshLevelList(); RefreshIdleReward(); RefreshIdleRate(); RegisterListeners(); InvokeRepeating("RefreshIdleReward", 60f, 60f); CommonUI commonUi = Global.gApp.gUiMgr.GetPanelCompent <CommonUI>(Wndid.CommonPanel); commonUi?.SetOrderLayer(info.Order - 1); TokenUI tokenUi = Global.gApp.gUiMgr.GetPanelCompent <TokenUI>(Wndid.TokenUI); tokenUi?.SetAddGoldValid(false); bool idleRewardOpen = PlayerDataMgr.singleton.ModuleIsOpen(GameModuleType.IdleReward); IdleRewardNode.gameObject.SetActive(idleRewardOpen); QuickIdleNode.gameObject.SetActive(idleRewardOpen); }