Пример #1
0
 void ItemUse()
 {
     if (m_Item != null && m_Item.IsValid())
     {
         if (m_NewPlayerGuideFlag_Step == 0)
         {
             NewPlayerGuidLogic.CloseWindow();
             m_NewPlayerGuideFlag_Step = -1;
             if (BackPackLogic.Instance())
             {
                 BackPackLogic.Instance().NewPlayerGuide(2);
             }
         }
         if (null != Singleton <ObjManager> .Instance.MainPlayer &&
             Singleton <ObjManager> .Instance.MainPlayer.CheckUseItem(m_Item))
         {
             Singleton <ObjManager> .Instance.MainPlayer.UseItem(m_Item);
         }
         if (m_Item.DataID == GlobeVar.MARRY_RING_ITEMID)
         {
             if (BackPackLogic.Instance() != null)
             {
                 BackPackLogic.Instance().CloseWindow();
             }
             if (PlayerFrameLogic.Instance() != null)
             {
                 PlayerFrameLogic.Instance().PlayerFrameHeadOnClick();
             }
         }
         CloseWindow();
     }
 }
Пример #2
0
 void ReturnTween()
 {
     if (PlayerFrameLogic.Instance() != null)
     {
         PlayerFrameLogic.Instance().PlayerFrameHeadOnClick();
     }
 }
        public uint Execute(PacketDistributed ipacket)
        {
            GC_GUILD_NEWRESERVE packet = (GC_GUILD_NEWRESERVE)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }

            //enter your logic
            if (Singleton <ObjManager> .GetInstance().MainPlayer != null)
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.ShowGuildNewReserveFlag = true;

                if (null != PlayerFrameLogic.Instance())
                {
                    PlayerFrameLogic.Instance().UpdateRemainNum();
                }

                if (MenuBarLogic.Instance() != null)
                {
                    MenuBarLogic.Instance().UpdateGuildAndMasterReserveMember();
                }
            }

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
        public uint Execute(PacketDistributed ipacket)
        {
            GC_RET_ROLE_DATA packet = (GC_RET_ROLE_DATA )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic

            if (FlyWingRoot.Instance() != null)
            {
                FlyWingRoot.Instance().SetFlightVlue(packet.Combatvalue);
            }

            if (PlayerFrameLogic.Instance())
            {
                PlayerFrameLogic.Instance().ChangeCombatValue(packet.Combatvalue);
            }

            if (RoleViewLogic.Instance() == null)
            {
                return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
            }

            RoleViewLogic.Instance().Name        = packet.Rolename;
            RoleViewLogic.Instance().CombatValue = packet.Combatvalue;
            RoleViewLogic.Instance().Level       = packet.Leve;
            RoleViewLogic.Instance().Profession  = packet.Profession;
            RoleViewLogic.Instance().RoleGUID    = packet.Guid;
            RoleViewLogic.Instance().CurHp       = packet.Curhp;
            RoleViewLogic.Instance().MaxHP       = packet.Maxhp;
            RoleViewLogic.Instance().CurMp       = packet.Curmp;
            RoleViewLogic.Instance().MaxMp       = packet.Maxmp;
            RoleViewLogic.Instance().CurExp      = packet.Curexp;
            RoleViewLogic.Instance().MaxExp      = packet.Maxexp;
            RoleViewLogic.Instance().PAttck      = packet.Pattack;
            RoleViewLogic.Instance().MAttack     = packet.Mattack;
            RoleViewLogic.Instance().Hit         = packet.Hit;
            RoleViewLogic.Instance().Critical    = packet.Critical;
            RoleViewLogic.Instance().PDefense    = packet.Pdefense;
            RoleViewLogic.Instance().MDefense    = packet.Mdefense;
            RoleViewLogic.Instance().DeCritical  = packet.Decritical;
            RoleViewLogic.Instance().Doge        = packet.Doge;
            RoleViewLogic.Instance().Strike      = packet.Strike;
            RoleViewLogic.Instance().CriticalAdd = packet.Criticaladd;
            RoleViewLogic.Instance().Ductical    = packet.Dutical;
            RoleViewLogic.Instance().CriticalMis = packet.Criticalmis;
            RoleViewLogic.Instance().OffLineExp  = packet.Curofflineexp;

            Tab_OffLineExp curTabOffLine = TableManager.GetOffLineExpByID(packet.Leve, 0);

            if (null != curTabOffLine)
            {
                RoleViewLogic.Instance().OffLineMaxExp = curTabOffLine.OffLineExpLimit;
            }
            RoleViewLogic.Instance().UpdateAttrRightView();
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Пример #5
0
 // 人物点击,包括 点击进入的教学
 static void PlayerFrameUI(int nIndex)
 {
     if (null == PlayerFrameLogic.Instance())
     {
         return;
     }
     PlayerFrameLogic.Instance().NewPlayerGuide(nIndex);
 }
Пример #6
0
    void SetShareType(ShareType nShareType, OpenType nOpenType)
    {
        if (PlayerFrameLogic.Instance() != null)
        {
            PlayerFrameLogic.Instance().PlayerFrameHeadOnClick();
        }
        ClearUp();
        m_nShareType = nShareType;
        m_nOpenType  = nOpenType;

        int JoinSet = 0, shareSet = 0;

        for (int i = 0; i < REWARD_ITEMCOUNT_MAX; i++)
        {
            Tab_ShareReward reward = TableManager.GetShareRewardByID((int)m_nShareType, 0);
            if (null == reward)
            {
                continue;
            }
            int nTargetType = reward.GetTargetTypebyIndex(i);
            int nItemID     = reward.GetItemDataIdbyIndex(i);
            if ((int)RewardTargetType.TARGETTYPE_JOIN_USER == nTargetType)
            {
                if (JoinSet < m_JoinRewardItem.Length)
                {
                    m_JoinRewardItem[JoinSet].InitItem(nItemID);
                    JoinSet++;
                }
            }
            else if ((int)RewardTargetType.TARGETTYPE_SHARE_USER == nTargetType)
            {
                if (shareSet < m_ShareRewardItem.Length)
                {
                    m_ShareRewardItem[shareSet].InitItem(nItemID);
                    shareSet++;
                }
            }
        }

        if (OpenType.OpenType_ActiviteCode == m_nOpenType)
        {
            m_ActiviteGameObject.SetActive(true);
        }
        else if (OpenType.OpenType_Share == m_nOpenType)
        {
            m_ShareGameObject.SetActive(true);
        }
        else
        {
            LogModule.ErrorLog("ShareWindow OpenType Invalid");
        }
        if (ShareType.ShareType_NanGua == m_nShareType)
        {
            m_labelDesc.text = StrDictionary.GetClientDictionaryString("#{3102}");
            UpdateRewardCount();
        }
    }
Пример #7
0
 // 关闭2级界面,隐藏菜单栏
 static void CloseUI()
 {
     UIManager.NewPlayerGuideCloseSubUI();
     NewPlayerGuidLogic.CloseWindow();
     // 隐藏菜单栏
     if (PlayerFrameLogic.Instance() && PlayerFrameLogic.Instance().Fold == false)
     {
         PlayerFrameLogic.Instance().PlayerFrameHeadOnClick();
     }
 }
    // 更新餐桌信息
    public static void UpdateDeskInfo(RestaurantInfo curRestaurant, GC_RESTAURANT_DESTUPDATE data)
    {
        int curDeskIndex = data.DestIndex;

        if (curDeskIndex >= curRestaurant.m_Desks.Length)
        {
            LogModule.ErrorLog("desk index is big than define " + curDeskIndex);
            return;
        }

        DeskInfo curDeskData = curRestaurant.m_Desks[curDeskIndex];

        curDeskData.m_IsActive  = true;
        curDeskData.m_DestState = (DeskState)data.DeskState;
        if (curDeskData.m_DestState == DeskState.EatFood)
        {
            for (int i = 0; i < data.deskGuestIDsCount; i++)
            {
                curDeskData.m_GuestIDs[i] = data.deskGuestIDsList[i];
            }
        }
        if (data.HasDeskFoodID)
        {
            curDeskData.m_FoodID = data.DeskFoodID;
        }
        else
        {
            curDeskData.m_FoodID = -1;
        }
        curDeskData.m_DeskFinishTime = (data.HasActionFinishTimer ? data.ActionFinishTimer : 0) + (int)Time.realtimeSinceStartup;
        int nRestaurantTipCount = 0;

        for (int i = 0; i < m_PlayerRestaurantInfo.m_Desks.Length; i++)
        {
            DeskInfo oDeskData = m_PlayerRestaurantInfo.m_Desks[i];
            if (oDeskData.m_IsActive && oDeskData.m_DestState == DeskState.WaitBilling)
            {
                nRestaurantTipCount++;
            }
        }
        if (!data.HasFriendGuid)
        {
            m_restaurantTipsCount = nRestaurantTipCount;

            if (MenuBarLogic.Instance() != null)
            {
                MenuBarLogic.Instance().UpdateRestaurantTips();
            }
            if (PlayerFrameLogic.Instance() != null)
            {
                PlayerFrameLogic.Instance().UpdateRemainNum();
            }
        }
    }
Пример #9
0
    //更新队员的信息
    public void UpdateTeamMember()
    {
        ClearTeamListUI();
        //如果没有队,则清空
        if (GameManager.gameManager.PlayerDataPool.TeamInfo.TeamID < 0)
        {
            m_InviteMemberButton.SetActive(false);
            return;
        }

        if (null == Singleton <ObjManager> .GetInstance().MainPlayer)
        {
            return;
        }

        //同时更新自己的队长图标
        if (null != PlayerFrameLogic.Instance() &&
            null != Singleton <ObjManager> .GetInstance().MainPlayer)
        {
            PlayerFrameLogic.Instance().SetTeamCaptain(Singleton <ObjManager> .GetInstance().MainPlayer.IsTeamLeader());
        }

        int index = 0;

        TeamMember[] member = GameManager.gameManager.PlayerDataPool.TeamInfo.teamMember;
        for (int i = 0; i < member.Length; ++i)
        {
            //如果队员的GUID为非空,并且和主角不一样,则显示
            if (member[i].Guid != GlobeVar.INVALID_GUID && member[i].Guid != Singleton <ObjManager> .GetInstance().MainPlayer.GUID)
            {
                ShowMemberInfo(m_MemberUI[index], member[i]);
                index++;
            }
        }
        if (index == 0)
        {
            m_InviteMemberButton.SetActive(true);
        }
        else
        {
            m_InviteMemberButton.SetActive(false);
        }
        Transform tf = transform.Find("Grid");

        if (tf != null)
        {
            UIGrid ug = tf.GetComponent <UIGrid>();
            if (ug != null)
            {
                ug.repositionNow = true;
            }
        }
    }
 public static void CleanRestaurantTip()
 {
     m_restaurantTipsCount = 0;
     //m_belleActiveCount = 0;
     if (MenuBarLogic.Instance() != null)
     {
         MenuBarLogic.Instance().UpdateRestaurantTips();
     }
     if (PlayerFrameLogic.Instance() != null)
     {
         PlayerFrameLogic.Instance().UpdateRemainNum();
     }
 }
Пример #11
0
 public void CloseWindow()
 {
     if (m_NewPlayerGuideIndex == 101)
     {
         m_NewPlayerGuideIndex = -1;
         NewPlayerGuidLogic.CloseWindow();
     }
     if (PlayerFrameLogic.Instance() != null)
     {
         bgTween.Reset();
         PlayerFrameLogic.Instance().PlayerFrameHeadOnClick();
     }
 }
Пример #12
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_USE_ITEM_RET packet = (GC_USE_ITEM_RET )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            Obj_MainPlayer MainPlayer = Singleton <ObjManager> .GetInstance().MainPlayer;

            if (null == MainPlayer)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }

            int success = packet.Success;
            int dataid  = packet.Dataid;

            int _totalCDTime = 0;

            Tab_UsableItem _UsableInfo = TableManager.GetUsableItemByID(dataid, 0);

            if (_UsableInfo != null)
            {
                int nCoolId = _UsableInfo.CoolDownId;
                Tab_CoolDownTime _CDTimeInfo = TableManager.GetCoolDownTimeByID(nCoolId, 0);
                if (_CDTimeInfo != null)
                {
                    _totalCDTime = _CDTimeInfo.CDTime;
                }
            }
            if (success == 1)
            {
                if (_totalCDTime > 0 && PlayerFrameLogic.Instance())
                {
                    if (MainPlayer.AutoHpID == dataid)
                    {
                        PlayerFrameLogic.Instance().InitAutoFight();
                        GameManager.gameManager.PlayerDataPool.HpItemCDTime = _totalCDTime;
                    }
                    else if (MainPlayer.AutoMpID == dataid)
                    {
                        PlayerFrameLogic.Instance().InitAutoFight();
                        GameManager.gameManager.PlayerDataPool.MpItemCDTime = _totalCDTime;
                    }
                }
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
    /// <summary>
    /// 动画完成
    /// </summary>
    public void OnOverAnimation()
    {
        CameraManager.Instance.CameraCullingMask(Color.black, 0);

        if (JtddSceneControl.Instance() != null)
        {
            JtddSceneControl.Instance().ShowSceneObject("SceneModel/Suidao");
        }

        if (BackCamerControll.Instance() != null)
        {
            BackCamerControll.Instance().InitBlackScreenTween(Color.black, 1.0f, 1.0f, 0.0f);
            BackCamerControll.Instance().PlayBlackScreenTween();
            BackCamerControll.Instance().SetAutoClose(true);
        }

        if (Singleton <ObjManager> .GetInstance() != null)
        {
            Singleton <ObjManager> .GetInstance().CreateMainPlayer();
        }

        ProcessInput.IsProcessInput = true;
        if (null != GameManager.gameManager.SceneLogic)
        {
            GameManager.gameManager.SceneLogic.CharacterDisplayFilter = Games.Scene.SceneLogic.ECharacterDisplayFilter.ShowAll;
        }
        Time.timeScale = 1;

        if (PlayerFrameLogic.Instance() != null)
        {
            PlayerFrameLogic.Instance().HideHPAndMPText();
        }
        if (SkillBarLogic.Instance() != null)
        {
            SkillBarLogic.Instance().HideTransformButtonInDemo();
        }

        GameManager.gameManager.SoundManager.StopSoundEffect(210);
        GameManager.gameManager.SoundManager.StopSoundEffect(211);
        GameManager.gameManager.SoundManager.StopSoundEffect(212);
        GameManager.gameManager.SoundManager.StopSoundEffect(213);

        GameManager.gameManager.SoundManager.PlayBGMusic(248, 0.5f, 0.5f);

        //删除该物体
        Destroy(this.gameObject);
        Resources.UnloadUnusedAssets();
        GC.Collect();
    }
Пример #14
0
    public void OnTabClicked(TabButton curTab)
    {
        if (!m_bEnableClick)
        {
            return;
        }

        if (curHighLightTab == curTab)
        {
            #region
            //策划需求双击主界面上任务界面的任务按钮和组队按钮,分别打开任务界面和组队界面。
            if (curTab != null)
            {
                switch (curTab.name)
                {
                case "Tab1-Mission":
                    MissionLogLogic.IsOpenFromMissionDialog = true;
                    if (PlayerFrameLogic.Instance() != null)
                    {
                        PlayerFrameLogic.Instance().PlayerFrameHeadOnClick();
                    }
                    UIManager.ShowUI(UIInfo.MissionLogRoot);
                    break;

                case "Tab2-Team":
                    RelationLogic.m_OpenWay = RelationLogic.OPEN_WAY.MISSION_TEAM;
                    if (GameManager.gameManager.PlayerDataPool.TeamInfo != null && Games.GlobeDefine.GlobeVar.INVALID_ID != GameManager.gameManager.PlayerDataPool.TeamInfo.TeamID)
                    {
                        RelationLogic.OpenTeamWindow(RelationTeamWindow.TeamTab.TeamTab_TeamInfo);
                    }
                    else
                    {
                        RelationLogic.OpenTeamWindow(RelationTeamWindow.TeamTab.TeamTab_NearTeam);
                    }
                    break;

                default:
                    break;
                }
            }
            #endregion
            return;
        }
        if (RelationFriendWindow.Instance() != null && RelationFriendWindow.Instance().m_OtherWindows.activeSelf)
        {
            RelationFriendWindow.Instance().m_OtherWindows.SetActive(false);
        }
        DoChangeTab(curTab);
    }
Пример #15
0
        //收到离开队伍消息
        public void LeaveTeam()
        {
            //清理队伍数据
            GameManager.gameManager.PlayerDataPool.TeamInfo.CleanUp();

            //通知UI清理队伍数据
            TeamList.Instance().ClearTeamListUI();

            //更新队长头像
            if (null != PlayerFrameLogic.Instance())
            {
                PlayerFrameLogic.Instance().SetTeamCaptain(false);
            }

            //退出组队跟随状态
            LeaveTeamFollow();
        }
        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);
        }
Пример #17
0
 public void UpdateLevelUpRemindPoint()
 {
     if (m_LevelUpRemindPoint == null)
     {
         return;
     }
     if (null == PlayerFrameLogic.Instance())
     {
         return;
     }
     if (PlayerFrameLogic.Instance().GetPartnerSkillCanLevelUpCount() > 0)
     {
         m_LevelUpRemindPoint.gameObject.SetActive(true);
     }
     else
     {
         m_LevelUpRemindPoint.gameObject.SetActive(false);
     }
 }
 public void updateRemindPoint()
 {
     if (m_AutoFightRemindPoint == null)
     {
         return;
     }
     if (null == PlayerFrameLogic.Instance())
     {
         return;
     }
     if (PlayerFrameLogic.Instance().GetSystemLogicTipCount() > 0)
     {
         m_AutoFightRemindPoint.gameObject.SetActive(true);
     }
     else
     {
         m_AutoFightRemindPoint.gameObject.SetActive(false);
     }
 }
Пример #19
0
 public void UpdateSystemCountTip()
 {
     if (m_SystemCountTip == null)
     {
         return;
     }
     if (null == PlayerFrameLogic.Instance())
     {
         return;
     }
     if (PlayerFrameLogic.Instance().GetSystemLogicTipCount() > 0)
     {
         m_SystemCountTip.gameObject.SetActive(true);
     }
     else
     {
         m_SystemCountTip.gameObject.SetActive(false);
     }
 }
Пример #20
0
 public void updateGemRemindPoint()
 {
     if (m_GemRemindPoint == null)
     {
         return;
     }
     if (null == PlayerFrameLogic.Instance())
     {
         return;
     }
     if (PlayerFrameLogic.Instance().GetGemHoleCanOpenCount(1) > 0 ||
         PlayerFrameLogic.Instance().GetGemHoleCanOpenCount(2) > 0 ||
         PlayerFrameLogic.Instance().GetGemHoleCanOpenCount(3) > 0)
     {
         m_GemRemindPoint.gameObject.SetActive(true);
     }
     else
     {
         m_GemRemindPoint.gameObject.SetActive(false);
     }
 }
Пример #21
0
 public void UpdateRoleCountTip()
 {
     if (m_RoleCountTip == null)
     {
         return;
     }
     if (null == PlayerFrameLogic.Instance())
     {
         return;
     }
     if (PlayerFrameLogic.Instance().GetGemHoleCanOpenCount(1) > 0 ||
         PlayerFrameLogic.Instance().GetGemHoleCanOpenCount(2) > 0 ||
         PlayerFrameLogic.Instance().GetGemHoleCanOpenCount(3) > 0)
     {
         m_RoleCountTip.gameObject.SetActive(true);
     }
     else
     {
         m_RoleCountTip.gameObject.SetActive(false);
     }
 }
Пример #22
0
 public void updateGemRemindPoint()
 {
     for (int i = 1; i < (int)CONSTVALUE.GEM_SLOT_NUM; i++)//跳过第一个先
     {
         if (m_GemRemindPoint[i] == null)
         {
             return;
         }
         if (null == PlayerFrameLogic.Instance())
         {
             return;
         }
         if (PlayerFrameLogic.Instance().GetGemHoleCanOpenCount(i) > 0)
         {
             m_GemRemindPoint[i].gameObject.SetActive(true);
         }
         else
         {
             m_GemRemindPoint[i].gameObject.SetActive(false);
         }
     }
 }
Пример #23
0
 private void OnClosePopUI(Dictionary <string, GameObject> curList, string curName)
 {
     if (TryDestroyUI(curList, curName))
     {
         // 关闭导航栏打开的二级UI时 收回导航栏
         if (null != PlayerFrameLogic.Instance())
         {
             PlayerFrameLogic.Instance().gameObject.SetActive(true);
             if (PlayerFrameLogic.Instance().Fold)
             {
                 PlayerFrameLogic.Instance().SwitchAllWhenPopUIShow(true);
             }
         }
         if (MenuBarLogic.Instance() != null)
         {
             if (MenuBarLogic.Instance().Fold)
             {
                 MenuBarLogic.Instance().gameObject.SetActive(true);
             }
         }
     }
 }
Пример #24
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_SET_GUIDE_DIR_SIGN_DEST packet = (GC_SET_GUIDE_DIR_SIGN_DEST)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            float posX = ((float)packet.PosX) / 100;
            float posZ = ((float)packet.PosZ) / 100;

            if (null != GameManager.gameManager.ActiveScene)
            {
                GameManager.gameManager.ActiveScene.SetGuideDestination(packet.SceneID, posX, posZ, packet.DestEffect);
            }

            if (packet.SceneID == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_FB_CABALINTRO &&
                NewPlayerGuidLogic.txtFteIndex == 0 &&
                packet.DestEffect == 1)
            {
                NewPlayerGuidLogic.OpenWindow_Circle(PlayerFrameLogic.Instance().gameObject, 1, Utils.GetDicByID(11173),
                                                     "center", -1, false, false, false, null, null, false);
            }
            else if (packet.SceneID == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_FB_CABALINTRO &&
                     NewPlayerGuidLogic.txtFteIndex == 1)
            {
                NewPlayerGuidLogic.OpenWindow_Circle(PlayerFrameLogic.Instance().gameObject, 1, Utils.GetDicByID(11174),
                                                     "center", -1, false, false, false, null, null, false);
            }
            else if (packet.SceneID == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_FB_CABALINTRO &&
                     NewPlayerGuidLogic.txtFteIndex == 2)
            {
                NewPlayerGuidLogic.OpenWindow_Circle(PlayerFrameLogic.Instance().gameObject, 1, Utils.GetDicByID(11177),
                                                     "center", -1, false, false, false, null, null, false);
            }

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Пример #25
0
    // 从m_UIOpenedList中pop一个界面,根据isDoClose确定是否执行关闭操作
    // 返回值为true时不弹出游戏退出提示,false时弹出
    public static bool PopOpenedList(bool isDoClose = true)
    {
        // Login 场景不处理
        if (GameManager.gameManager.RunningScene == (int)GameDefine_Globe.SCENE_DEFINE.SCENE_LOGIN)
        {
            return(false);
        }

        if (m_instance == null || m_instance.m_UIOpenedList == null)
        {
            return(false);
        }
        int count = m_instance.m_UIOpenedList.Count;

        if (count <= 0)
        {
            return(false);
        }
        UIPathData ui = m_instance.m_UIOpenedList[count - 1];

        if (isDoClose)
        {
            if (ui.uiType == UIPathData.UIType.TYPE_BASE || ui.uiType == UIPathData.UIType.TYPE_DEATH || ui.uiType == UIPathData.UIType.TYPE_STORY)
            {
                if (PlayerFrameLogic.Instance() != null && !PlayerFrameLogic.Instance().Fold)
                {
                    PlayerFrameLogic.Instance().PlayerFrameHeadOnClick();
                    m_instance.m_UIOpenedList.RemoveAt(count - 1);
                    return(true);
                }
                return(false);
            }
            CloseUI(ui);
            return(true);
        }
        m_instance.m_UIOpenedList.RemoveAt(count - 1);
        return(true);
    }
Пример #26
0
    void DoAddUI(UIPathData uiData, GameObject curWindow, object fun, object param)
    {
        if (!m_dicWaitLoad.Remove(uiData.name))
        {
            return;
        }

        if (null != curWindow)
        {
#if UNITY_ANDROID
            if (m_PrefabNameList != null && m_PrefabList != null)
            {
                if (m_PrefabNameList.Contains(uiData.name))
                {
                    if (!m_PrefabList.ContainsKey(uiData.name))
                    {
                        m_PrefabList.Add(uiData.name, curWindow);
                    }
                    else
                    {
                        if (m_PrefabList[uiData.name] == null)
                        {
                            m_PrefabList[uiData.name] = curWindow;
                        }
                    }
                }
            }
#endif

#if UNITY_ANDROID
            if (!PlatformHelper.IsChannelMainland())
            {
                PushToOpenedList(uiData);
            }
#endif

            Transform parentRoot = null;
            Dictionary <string, GameObject> relativeDic = null;
            switch (uiData.uiType)
            {
            case UIPathData.UIType.TYPE_BASE:
                parentRoot  = BaseUIRoot;
                relativeDic = m_dicBaseUI;
                break;

            case UIPathData.UIType.TYPE_POP:
                parentRoot  = PopUIRoot;
                relativeDic = m_dicPopUI;
                break;

            case UIPathData.UIType.TYPE_STORY:
                parentRoot  = StoryUIRoot;
                relativeDic = m_dicStoryUI;
                break;

            case UIPathData.UIType.TYPE_TIP:
                parentRoot  = TipUIRoot;
                relativeDic = m_dicTipUI;
                break;

            case UIPathData.UIType.TYPE_MENUPOP:
                parentRoot  = MenuPopUIRoot;
                relativeDic = m_dicMenuPopUI;
                break;

            case UIPathData.UIType.TYPE_MESSAGE:
                parentRoot  = MessageUIRoot;
                relativeDic = m_dicMessageUI;
                break;

            case UIPathData.UIType.TYPE_DEATH:
                parentRoot  = DeathUIRoot;
                relativeDic = m_dicDeathUI;
                break;

            default:
                break;
            }

            if (uiData.uiType == UIPathData.UIType.TYPE_POP || uiData.uiType == UIPathData.UIType.TYPE_MENUPOP)
            {
                OnLoadNewPopUI(m_dicPopUI, uiData.name);
                OnLoadNewPopUI(m_dicMenuPopUI, uiData.name);
            }

            if (null != relativeDic && relativeDic.ContainsKey(uiData.name))
            {
                relativeDic[uiData.name].SetActive(true);
            }
            else if (null != parentRoot && null != relativeDic)
            {
                GameObject newWindow = GameObject.Instantiate(curWindow) as GameObject;
                if (null != newWindow)
                {
                    newWindow.transform.parent        = parentRoot;
                    newWindow.transform.localPosition = Vector3.zero;
                    newWindow.transform.localScale    = Vector3.one;
                    relativeDic.Add(uiData.name, newWindow);

                    //自动加的一个比较大的MenuSubUIShield,有个大collider。王喆说以后应该不用了

                    /*if (uiData.uiType == UIPathData.UIType.TYPE_MENUPOP)
                     * {
                     *  LoadMenuSubUIShield(newWindow);
                     * }*/
                }
            }

            //if (uiData.uiType == UIPathData.UIType.TYPE_STORY)
            //{
            //    BaseUIRoot.gameObject.SetActive(false);
            //    TipUIRoot.gameObject.SetActive(false);
            //    PopUIRoot.gameObject.SetActive(false);
            //    MenuPopUIRoot.gameObject.SetActive(false);
            //    MessageUIRoot.gameObject.SetActive(false);
            //    StoryUIRoot.gameObject.SetActive(true);
            //}
            //else if (uiData.uiType == UIPathData.UIType.TYPE_MENUPOP)
            if (uiData.uiType == UIPathData.UIType.TYPE_POP ||
                (uiData.name == "BackPackRoot" && BackPackLogic.m_OpenWay == BackPackLogic.OPEN_WAY.NEWFUNCTION_QUICK) ||
                (uiData.name == "RelationRoot" && RelationLogic.m_OpenWay == RelationLogic.OPEN_WAY.MISSION_TEAM))
            {
                if (PlayerFrameLogic.Instance() != null)
                {
                    PlayerFrameLogic.Instance().SwitchAllWhenPopUIShow(false);
                    PlayerFrameLogic.Instance().gameObject.SetActive(false);
                }
                if (MenuBarLogic.Instance() != null)
                {
                    MenuBarLogic.Instance().gameObject.SetActive(false);
                }

                if (!(uiData.name.Equals("ServerChooseController") ||
                      uiData.name.Equals("RoleCreate")))
                {
#if !UNITY_ANDROID
                    StartCoroutine(GCAfterOneSceond());
#endif
                }
            }
            else if (uiData.uiType == UIPathData.UIType.TYPE_MENUPOP)
            {
                if (null != PlayerFrameLogic.Instance() && null != MenuBarLogic.Instance())
                {
                    MenuBarLogic.Instance().gameObject.SetActive(false);
                    PlayerFrameLogic.Instance().gameObject.SetActive(false);

#if !UNITY_ANDROID
                    StartCoroutine(GCAfterOneSceond());
#endif
                }
            }
            else if (uiData.uiType == UIPathData.UIType.TYPE_DEATH)
            {
                ReliveCloseOtherSubUI();
            }
        }

        if (null != fun)
        {
            OnOpenUIDelegate delOpenUI = fun as OnOpenUIDelegate;
            delOpenUI(curWindow != null, param);
        }
    }
        public uint Execute(PacketDistributed ipacket)
        {
            GC_COMBATVALUE_RET packet = (GC_COMBATVALUE_RET )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic

            if (Singleton <ObjManager> .GetInstance().MainPlayer != null)
            {
                if (packet.ShowPowerRemind == 1)
                {
                    int nNewCombatValue = packet.CombatValue;
                    int nAddCombatValue = nNewCombatValue - Singleton <ObjManager> .GetInstance().MainPlayer.BaseAttr.CombatValue;

                    if (nAddCombatValue > 0)
                    {
                        PowerRemindLogic.InitPowerInfo(nNewCombatValue, nAddCombatValue);
                    }
                }

                Singleton <ObjManager> .GetInstance().MainPlayer.BaseAttr.CombatValue = packet.CombatValue;

                if (BackPackLogic.Instance())
                {
                    //设置了客户端战斗力之后更新背包界面
                    BackPackLogic.Instance().UpdatePlayerInfo();
                }

                if (PVPPowerWindow.Instance())
                {
                    PVPPowerWindow.Instance().UpdateCombatValue();
                }
                if (RoleViewLogic.Instance() != null)
                {
                    RoleViewLogic.Instance().OnCombatChange();
                }
                if (FlyWingRoot.Instance() != null)
                {
                    FlyWingRoot.Instance().SetFlightVlue(packet.CombatValue);
                }
                if (PlayerFrameLogic.Instance())
                {
                    PlayerFrameLogic.Instance().ChangeCombatValue(packet.CombatValue);
                }
            }
            else
            {
                GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.CombatValue = packet.CombatValue;
            }
#if UNITY_ANDROID
            // 台湾安卓渠道特有
            if (PlatformHelper.IsChannelTW())
            {
                int newCombatValue = packet.CombatValue;
                // 提交战力排行榜数据
                PlatformHelper.SubmitRankScore(Games.GlobeDefine.GameDefine_Globe.GOOGLEPLAY_RANK_TYPE.COMBAT_VALUE, newCombatValue);
                // 解锁战力成就
                if (newCombatValue >= 1000000)
                {
                    PlatformHelper.UnlockAchievement(Games.GlobeDefine.GameDefine_Globe.GOOGLEPLAY_ACHIEVEMENT_TYPE.COMBAT_VALUE_100);
                }
                else if (newCombatValue >= 700000)
                {
                    PlatformHelper.UnlockAchievement(Games.GlobeDefine.GameDefine_Globe.GOOGLEPLAY_ACHIEVEMENT_TYPE.COMBAT_VALUE_70);
                }
                else if (newCombatValue >= 500000)
                {
                    PlatformHelper.UnlockAchievement(Games.GlobeDefine.GameDefine_Globe.GOOGLEPLAY_ACHIEVEMENT_TYPE.COMBAT_VALUE_50);
                }
                else if (newCombatValue >= 300000)
                {
                    PlatformHelper.UnlockAchievement(Games.GlobeDefine.GameDefine_Globe.GOOGLEPLAY_ACHIEVEMENT_TYPE.COMBAT_VALUE_30);
                }
                else if (newCombatValue >= 200000)
                {
                    PlatformHelper.UnlockAchievement(Games.GlobeDefine.GameDefine_Globe.GOOGLEPLAY_ACHIEVEMENT_TYPE.COMBAT_VALUE_20);
                }
                else if (newCombatValue >= 100000)
                {
                    PlatformHelper.UnlockAchievement(Games.GlobeDefine.GameDefine_Globe.GOOGLEPLAY_ACHIEVEMENT_TYPE.COMBAT_VALUE_10);
                }
                else if (newCombatValue >= 50000)
                {
                    PlatformHelper.UnlockAchievement(Games.GlobeDefine.GameDefine_Globe.GOOGLEPLAY_ACHIEVEMENT_TYPE.COMBAT_VALUE_5);
                }
            }
#endif
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Пример #28
0
    public void AfterTweenPosition()
    {
        if (m_ItemType == NEWITEMTYPE.TYPE_SKILL)
        {
            if (!hasAttachSkill)
            {
                if (SkillBarLogic.Instance() != null)
                {
                    if (GetItemListSkillCount() == 0)
                    {
                        //播放新技能特效
                        SkillBarLogic.Instance().SkillBtnShowEffect = SkillBarLogic.Instance().ShowSkillButtonEffect;
                        SkillBarLogic.Instance().PlayNewSkillEffect(m_destGameObject);

                        SkillBarLogic.Instance().UpdateSkillBarInfo();
                    }
                    if (m_NewPlayerGuide_Step != 0)
                    {
                        m_NewPlayerGuide_Step = 0;
                    }
                }
            }
        }
        else
        {
            if (m_ItemType == NEWITEMTYPE.TYPE_MENUBAR || m_ItemType == NEWITEMTYPE.TYPE_FELLOW3DSHOW)
            {
                if (MenuBarLogic.Instance() != null)
                {
                    MenuBarLogic.Instance().InitButtonActive();
                }
                if (PlayerFrameLogic.Instance() != null)
                {
                    PlayerFrameLogic.Instance().AddRemindNum();
                }
            }
            else if (m_ItemType == NEWITEMTYPE.TYPE_FUNCTION)
            {
                if (FunctionButtonLogic.Instance() != null)
                {
                    FunctionButtonLogic.Instance().InitButtonActive();
                    FunctionButtonLogic.Instance().PlayNewButtonEffect();
                }
            }
            MissionNewPlayerGuide(m_IntParam);
        }

        m_ItemTween.enabled = false;

        //如果有附带技能
        if (hasAttachSkill)
        {
            NewPlayerGuider(2);
        }
        else
        {
            m_AttachItemTween.enabled = false;
            if (m_ItemListBuffer.Count > 0)
            {
                InitDataInfo curInfo = m_ItemListBuffer[0];
                NewItemGetLogic.Instance().Init(curInfo._spriteName, curInfo._destGameObject, curInfo._type, curInfo._nNewSkillID, curInfo._attachGameObject, curInfo._ItemName, curInfo._strFuncName, curInfo._strDec);
                m_ItemListBuffer.RemoveAt(0);
            }
            else
            {
                UIManager.CloseUI(UIInfo.NewItemGetRoot);
                m_bShow = false;
            }
        }
    }
Пример #29
0
    static void OnLoadItemGetRoot(bool bSuccess, object param)
    {
        // 异常 如果资源加载失败
        if (bSuccess == false)
        {
            InitDataInfo curInfo = param as InitDataInfo;
            if (curInfo == null)
            {
                return;
            }
            if (curInfo._type == NEWITEMTYPE.TYPE_SKILL)
            {
                if (SkillBarLogic.Instance() != null)
                {
                    SkillBarLogic.Instance().UpdateSkillBarInfo();

                    if (GameManager.gameManager.PlayerDataPool.ForthSkillFlag == true)
                    {
                        if (SkillBarLogic.Instance())
                        {
                            SkillBarLogic.Instance().NewPlayerGuide(4);
                        }
                    }
                }
            }
            else
            {
                if (curInfo._type == NEWITEMTYPE.TYPE_MENUBAR || curInfo._type == NEWITEMTYPE.TYPE_FELLOW3DSHOW)
                {
                    if (MenuBarLogic.Instance() != null)
                    {
                        MenuBarLogic.Instance().InitButtonActive();
                    }
                    if (PlayerFrameLogic.Instance() != null)
                    {
                        PlayerFrameLogic.Instance().AddRemindNum();
                    }
                }
                else if (curInfo._type == NEWITEMTYPE.TYPE_FUNCTION)
                {
                    if (FunctionButtonLogic.Instance() != null)
                    {
                        FunctionButtonLogic.Instance().InitButtonActive();
                        FunctionButtonLogic.Instance().PlayNewButtonEffect();
                    }
                }
            }
            return;
        }

        if (NewItemGetLogic.Instance() != null)
        {
            InitDataInfo curInfo = param as InitDataInfo;
            NewItemGetLogic.Instance().Init(curInfo._spriteName, curInfo._destGameObject, curInfo._type, curInfo._nNewSkillID, curInfo._attachGameObject, curInfo._ItemName, curInfo._strFuncName, curInfo._strDec);
            if (JoyStickLogic.Instance() != null)
            {
                ProcessInput.Instance().ReleaseTouch();
                JoyStickLogic.Instance().ReleaseJoyStick();
            }
        }
    }
Пример #30
0
    public void UpdateDrug()
    {
        m_AutoFightInfoHpIndex.spriteName = "";
        m_AutoFightInfoMpIndex.spriteName = "";
        m_NilAutoFightInfoHp.gameObject.SetActive(false);
        m_NilAutoFightInfoMp.gameObject.SetActive(false);
        m_AutoFightInfoEquipIndex.spriteName = "";
        m_NilAutoFightInfoEquip.gameObject.SetActive(false);
        GameItemContainer BackPack = GameManager.gameManager.PlayerDataPool.BackPack;
        Obj_MainPlayer    User     = Singleton <ObjManager> .Instance.MainPlayer;

        if (User)   //更新信息
        {
            if (User.AutoHpID != -1)
            {
                Tab_CommonItem curItem = TableManager.GetCommonItemByID(User.AutoHpID, 0);
                if (curItem != null)
                {
                    m_AutoFightInfoHpIndex.spriteName = curItem.Icon;
                    if (BackPack.GetItemCountByDataId(User.AutoHpID) <= 0)
                    {
                        m_NilAutoFightInfoHp.gameObject.SetActive(true);
                    }
                }
            }
            if (User.AutoMpID != -1)
            {
                Tab_CommonItem curItem = TableManager.GetCommonItemByID(User.AutoMpID, 0);
                if (curItem != null)
                {
                    m_AutoFightInfoMpIndex.spriteName = curItem.Icon;
                    if (BackPack.GetItemCountByDataId(User.AutoMpID) <= 0)
                    {
                        m_NilAutoFightInfoMp.gameObject.SetActive(true);
                    }
                }
            }
            m_AutoFightInfoEquipIndex.transform.parent.FindChild("Label").GetComponent <UILabel>().text = "";
            if (User.AutoEquipGuid != GlobeVar.INVALID_GUID)
            {
                GameItemContainer EquipPack  =  GameManager.gameManager.PlayerDataPool.EquipPack;
                if (EquipPack != null)
                {
                    for (int index = 0; index < EquipPack.ContainerSize; index++)
                    {
                        GameItem equip = EquipPack.GetItem(index);
                        if (equip != null && equip.IsValid() && equip.Guid == User.AutoEquipGuid)
                        {
                            Tab_CommonItem curItem = TableManager.GetCommonItemByID(equip.DataID, 0);
                            if (null != curItem)
                            {
                                m_AutoFightInfoEquipIndex.spriteName = curItem.Icon;
                                //m_NilAutoFightInfoEquip.gameObject.SetActive(true);
                                m_AutoFightInfoEquipQuality.spriteName = equip.GetQualityFrame();
                                m_AutoFightInfoEquipIndex.transform.parent.GetComponent <UISprite>().spriteName             = equip.GetQualityFrame();
                                m_AutoFightInfoEquipIndex.transform.parent.FindChild("Label").GetComponent <UILabel>().text = "+" + equip.EnchanceLevel.ToString();
                            }
                        }
                    }
                }
            }
        }
        if (PlayerFrameLogic.Instance())
        {
            PlayerFrameLogic.Instance().InitAutoFight();
        }
    }