public static AutoSelSkillItem CreateItem(GameObject grid, GameObject resItem, AutoFightLogic parent, int OwnIndex, int nSkillId, bool IsToggle) { Tab_SkillEx _skillEx = TableManager.GetSkillExByID(nSkillId, 0); if (_skillEx != null) { Tab_SkillBase _skillBase = TableManager.GetSkillBaseByID(_skillEx.BaseId, 0); if (_skillBase != null && _skillBase.PriorityAutoFight != -1) { GameObject newItem = Utils.BindObjToParent(resItem, grid, nSkillId.ToString()); if (null != newItem) { AutoSelSkillItem curItemComponent = newItem.GetComponent <AutoSelSkillItem>(); if (null != curItemComponent) { // curItemComponent.m_nSkillID = nSkillId; curItemComponent.m_AutoSkillSprite.spriteName = _skillBase.Icon; curItemComponent.m_AutoSkillToggle.value = IsToggle; curItemComponent.m_nOwnIndex = OwnIndex; return(curItemComponent); } } } } return(null); }
public void OnClickMedicneItem() { GameItemContainer BackPack = GameManager.gameManager.PlayerDataPool.BackPack; if (Singleton <ObjManager> .Instance.MainPlayer) { if (AutoFightLogic.Instance()) { AutoFightLogic.Instance().OnClickSelectItem(this); } if (m_Type == 1) { Singleton <ObjManager> .Instance.MainPlayer.AutoHpID = m_nId; Singleton <ObjManager> .Instance.MainPlayer.HpDrugGUID = BackPack.GetItemGuidByDataID(m_nId); Singleton <ObjManager> .Instance.MainPlayer.AutoIsSelectDrug = true; } else if (m_Type == 2) { Singleton <ObjManager> .Instance.MainPlayer.AutoMpID = m_nId; Singleton <ObjManager> .Instance.MainPlayer.MpDrugGUID = BackPack.GetItemGuidByDataID(m_nId); Singleton <ObjManager> .Instance.MainPlayer.AutoIsSelectDrug = true; } else if (m_Type == 3) { Singleton <ObjManager> .Instance.MainPlayer.AutoEquipGuid = m_ItemGuid; if (AutoFightLogic.Instance() != null) { AutoFightLogic.Instance().UpdateDrug(); } } _showChoose(); } }
public void setData(int nType, AutoFightLogic parent) { m_AutoWindow.m_nType = nType; //m_FightLogic = parent; if (nType == 3) { m_ItemName.text = StrDictionary.GetClientDictionaryString("#{3147}");//挂机_UI_20140902 选择装备 } else { m_ItemName.text = StrDictionary.GetClientDictionaryString("#{1202}");//挂机_UI_20140312 选择药品 } m_AutoWindow.UpdateData(nType, parent); }
void OnCloseClick() { UIManager.CloseUI(UIInfo.SystemAndAutoFight); if (AutoFightLogic.Instance()) { AutoFightLogic.Instance().AutoFightOK(); } if (Singleton <ObjManager> .Instance != null) { Singleton <ObjManager> .Instance.UpdateHidePlayers(); } }
public void NewPlayerGuide(int index) { if (index < 0) { return; } m_NewPlayerGuideFlag_Step = index; switch (index) { case 0: NewPlayerGuidLogic.OpenWindow(m_TabController.transform.Find("Btn2-AutoFight").gameObject, 270, 110, StrDictionary.GetClientDictionaryString("#{11540}"), "bottom", 0, true, true); break; case 1: NewPlayerGuidLogic.OpenWindow(m_AutoFight, 900, 250, GCGame.Utils.GetDicByID(11541), "bottom", -1, true, true, false, null, null, -0.1f, 0.2f, true, false, () => { NewPlayerGuide(2); }); break; case 2: NewPlayerGuidLogic.OpenWindow(m_AutoFight, 900, 250, GCGame.Utils.GetDicByID(11542), "top", -1, true, true, false, null, null, -0.1f, -0.4f, true, false, () => { NewPlayerGuide(3); }); break; case 3: NewPlayerGuidLogic.OpenWindow(AutoFightLogic.Instance().m_RightHightLight.transform.parent.gameObject, 270, 110, "", "top", 0, true, true); break; case 4: NewPlayerGuidLogic.OpenWindow(m_AutoFight, 900, 300, GCGame.Utils.GetDicByID(11543), "bottom", -1, true, true, false, null, null, -0.1f, 0.2f, true, false, () => { NewPlayerGuide(5); }); break; case 5: m_NewPlayerGuideFlag_Step = -1; NewPlayerGuidLogic.CloseWindow(); break; default: break; } }
public static AutoitemLogicEx CreateItem(GameObject grid, GameObject resItem, int type, Tab_CommonItem CommonItem) { GameObject curItemObject = Utils.BindObjToParent(resItem, grid, CommonItem.Id.ToString()); if (null != curItemObject) { AutoitemLogicEx curItemComponent = curItemObject.GetComponent <AutoitemLogicEx>(); if (null != curItemComponent) { curItemComponent.m_Type = type; curItemComponent.m_ItemName.text = CommonItem.Name; curItemComponent.m_ItemIcon.spriteName = CommonItem.Icon; curItemComponent.m_nId = CommonItem.Id; curItemComponent.m_ItemLevel.text = "LV " + CommonItem.MinLevelRequire.ToString(); curItemComponent.m_ItemIcon.transform.parent.FindChild("LV").GetComponent <UILabel>().text = ""; //curItemComponent.m_parent = parent; curItemComponent.m_ItemGuid = GlobeVar.INVALID_GUID; //curItemComponent.m_BackgroundSprite.spriteName = ""; //curItemComponent.m_QualitySprite.spriteName = ""; curItemComponent.gameObject.SetActive(true); if (type == 1) { if (Singleton <ObjManager> .Instance.MainPlayer.AutoHpID == CommonItem.Id) { curItemComponent._showChoose(); if (AutoFightLogic.Instance() != null) { AutoFightLogic.Instance().SelectItem = curItemComponent; } } } else if (type == 2) { if (Singleton <ObjManager> .Instance.MainPlayer.AutoMpID == CommonItem.Id) { curItemComponent._showChoose(); if (AutoFightLogic.Instance() != null) { AutoFightLogic.Instance().SelectItem = curItemComponent; } } } return(curItemComponent); } } return(null); }
public uint Execute(PacketDistributed ipacket) { GC_ASK_COMMONFLAG_RET packet = (GC_ASK_COMMONFLAG_RET )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic GameManager.gameManager.PlayerDataPool.CommonData.HandlePacket(packet); if (null != AwardLogic.Instance()) { AwardLogic.Instance().UpdateTip(); } if (null != FunctionButtonLogic.Instance()) { FunctionButtonLogic.Instance().UpdateButtonAwardTips(); } if (null != PlayerFrameLogic.Instance()) { PlayerFrameLogic.Instance().UpdateRemainNum(); } if (null != MenuBarLogic.Instance()) { MenuBarLogic.Instance().UpdateSystemCountTip(); MenuBarLogic.Instance().UpdateRoleCountTip(); } if (null != SystemAndAutoFightLogic.Instance()) { SystemAndAutoFightLogic.Instance().updateRemindPoint(); } if (null != AutoFightLogic.Instance()) { AutoFightLogic.Instance().updateRemindPoint(); } if (null != RoleViewLogic.Instance()) { RoleViewLogic.Instance().updateGemRemindPoint(); } if (null != GemLogic.Instance()) { GemLogic.Instance().updateGemRemindPoint(); } return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
public static AutoitemLogicEx CreateEquip(GameObject grid, GameObject resItem, int type, GameItem equip) { GameObject curItemObject = Utils.BindObjToParent(resItem, grid, equip.DataID.ToString()); if (null != curItemObject) { AutoitemLogicEx curItemComponent = curItemObject.GetComponent <AutoitemLogicEx>(); if (null != curItemComponent) { Tab_CommonItem curItem = TableManager.GetCommonItemByID(equip.DataID, 0); if (null != curItem) { curItemComponent.m_Type = type; curItemComponent.m_ItemName.text = curItem.Name; curItemComponent.m_ItemIcon.spriteName = curItem.Icon; curItemComponent.m_nId = curItem.Id; //curItemComponent.m_parent = parent; curItemComponent.m_ItemGuid = equip.Guid; curItemComponent.m_ItemLevel.text = "LV " + curItem.MinLevelRequire.ToString(); //curItemComponent.m_BackgroundSprite.spriteName = background; //curItemComponent.m_QualitySprite.spriteName = equip.GetQualityFrame(); curItemComponent.m_ItemIcon.transform.parent.GetComponent <UISprite>().spriteName = equip.GetQualityFrame(); curItemComponent.m_ItemIcon.transform.parent.FindChild("LV").GetComponent <UILabel>().text = "+" + equip.EnchanceLevel.ToString(); if (Singleton <ObjManager> .Instance.MainPlayer.AutoEquipGuid == curItemComponent.m_ItemGuid && curItemComponent.m_ItemGuid != GlobeVar.INVALID_GUID) { curItemComponent._showChoose(); if (AutoFightLogic.Instance() != null) { AutoFightLogic.Instance().SelectItem = curItemComponent; } } return(curItemComponent); } } } return(null); }
void OnEnable() { if (AutoFightLogic.Instance()) { AutoFightLogic.Instance().AutoFightOK(); //切UI的时候存储挂机设置 } m_AutoVoiceChatDownload_Friend.value = PlayerPreferenceData.AutoDownloadVoiceChat_Friend; m_AutoVoiceChatDownload_Team.value = PlayerPreferenceData.AutoDownloadVoiceChat_Team; m_AutoVoiceChatDownload_Guild.value = PlayerPreferenceData.AutoDownloadVoiceChat_Guild; m_AutoVoiceChatDownload_Master.value = PlayerPreferenceData.AutoDownloadVoiceChat_Master; //if (PlayerPreferenceData.IsFirstOpenMusicGame == true) { //m_MusicSlider.value = 0.99f ; //PlayerPreferenceData.SystemMusicVoice = 99 ; // PlayerPreferenceData.IsFirstOpenMusicGame = false; } //else { m_MusicSlider.value = (float)PlayerPreferenceData.SystemMusicVoice / 100; } m_Music.value = PlayerPreferenceData.SystemMusic == 1 ? true : false; //if (PlayerPreferenceData.IsFirstOpenVioceGame == true) { // PlayerPreferenceData.SystemSoundEffectVoice = 99 ; // m_SoundSlider.value = 0.99f ; // PlayerPreferenceData.IsFirstOpenVioceGame = false; } //else { m_SoundSlider.value = (float)PlayerPreferenceData.SystemSoundEffectVoice / 100; } m_SoundEffect.value = PlayerPreferenceData.SystemSoundEffect == 1 ? true : false; }
void Awake() { m_Instance = this; }
void OnDestroy() { m_Instance = null; }
void OnEnable() { if (PlatformHelper.IsGuest() && PlatformHelper.IsChannelKO()) { if (GuestBindButton) { GuestBindButton.SetActive(true); } } else { if (GuestBindButton) { GuestBindButton.SetActive(false); } } if (AutoFightLogic.Instance()) { AutoFightLogic.Instance().AutoFightOK(); //切UI的时候存储挂机设置 } #if UNITY_ANDROID if (UserCenterButton) { UserCenterButton.SetActive(true); } #endif m_bSystemTableau = false; if (PlayerPreferenceData.SystemTableau == 1) { m_TabTableau.ChangeTab("Tab_High"); } else if (PlayerPreferenceData.SystemTableau == 2) { m_TabTableau.ChangeTab("Tab_Centre"); } else if (PlayerPreferenceData.SystemTableau == 3) { m_TabTableau.ChangeTab("Tab_Low"); } #if UNITY_WP8 else { PlayerPreferenceData.SystemShowOtherPlayerCount = 15; } #endif // m_User = Singleton<ObjManager>.Instance.MainPlayer; m_TabTableau.delTabChanged = OnTabChangeTableau; //Start时不要调用到delTabChanged // m_Music.value = PlayerPreferenceData.SystemMusic == 1 ? true : false; // m_SoundEffect.value = PlayerPreferenceData.SystemSoundEffect == 1 ? true : false; m_NameEdition.value = PlayerPreferenceData.SystemNameBoard == 1 ? true : false; m_ScreenMove.value = PlayerPreferenceData.SystemScreenMove == 1 ? true : false; m_NewPlayerGuide.value = !PlayerPreferenceData.NewPlayerGuideClose; m_DeathPushEnable.value = PlayerPreferenceData.DeathPushDisable; m_KillNpcExp.value = PlayerPreferenceData.KillNpcExp; m_SkillEffect.value = PlayerPreferenceData.SystemSkillEffectEnable; m_DamageBoard.value = PlayerPreferenceData.SystemDamageBoardEnable; m_WallVision.value = PlayerPreferenceData.SystemWallVisionEnable; if (m_RefuseAllAddFriend != null) { m_RefuseAllAddFriend.value = PlayerPreferenceData.RefuseAllAddFriend; } if (m_RefuseDuel != null) { m_RefuseDuel.value = GameManager.gameManager.PlayerDataPool.CommonData.GetCommondFlag((int)USER_COMMONFLAG.CF_DISABLE_DUEL); } if (PlayerPreferenceData.SystemShowOtherPlayerCount > m_ShowPlayerNumMax) { m_SliderHideOtherPlayer.value = 1; } else { m_SliderHideOtherPlayer.value = (float)PlayerPreferenceData.SystemShowOtherPlayerCount / (float)(m_ShowPlayerNumMax); } //m_HideOtherPlayer.value = PlayerPreferenceData.SystemHideOtherPlayer; if (PlayerPreferenceData.SystemFloodlight == 0) { m_Floodlight.value = false; } else { m_Floodlight.value = true; } SystemStupWindow.SetActive(true); QuestionWindow.SetActive(false); CustomerWindow.SetActive(false); if (PlayerPreferenceData.SystemTableau == 0) //未初始化 { if (MobileHardwareInfo.Instance.HardwareLevel == Games.GlobeDefine.GameDefine_Globe.HardwardLevel.LEVEL_LOW) { m_TabTableau.ChangeTab("Tab_Low"); TabChangeTableauEx("Tab_Low"); } else { m_TabTableau.ChangeTab("Tab_Centre"); TabChangeTableauEx("Tab_Centre"); } } m_bSystemTableau = true; gridSystenButtons.Reposition(); }
public void UpdateData(int nType, AutoFightLogic fightlogic) { m_parent = fightlogic; m_curType = nType; UIManager.LoadItem(UIInfo.AutoDrugItem, OnLoadDrugItem); }