Ejemplo n.º 1
0
    private void RefreshTips()
    {
        if (mObjectCard == null)
        {
            return;
        }

        if (m_FunctionTipsManager == null)
        {
            m_FunctionTipsManager = FunctionTipsManager.GetInstance();
            if (m_FunctionTipsManager == null)
            {
                return;
            }
        }

        if (m_FunctionTipsManager.CheckHeroIsInDefaultTeam())
        {
            RefreshRuneTips();
        }
        else
        {
            CloseAllTips();
        }
    }
Ejemplo n.º 2
0
    IFunctionTipsController CreateFunctionTipsController()
    {
        GameObject             _go;
        FunctionTipsController _controller = new FunctionTipsController();

        var _manager = FunctionTipsManager.GetInstance();

        _go = selfTransform.FindChild("MonthCardBtn/TipsImage").gameObject;
        _controller.AddControlledObject(_go, _manager.CheckUnclaimedMonthCard);

        return(_controller);
    }
Ejemplo n.º 3
0
        //生成功能提示控制器
        IFunctionTipsController CreateFunctionTipsController()
        {
            GameObject             _go;
            FunctionTipsController _controller = new FunctionTipsController();

            var _manager = FunctionTipsManager.GetInstance();

            _go = selfTransform.FindChild("RightPanel/Recruit_Btn/Image").gameObject;                     //招募按钮
            _controller.AddControlledObject(_go, _manager.CheckRelicFreeCount, _manager.CheckHeroRecruitFree);

            _go = selfTransform.FindChild("RightPanel/Email_Btn/Image").gameObject;                       //邮箱按钮
            _controller.AddControlledObject(_go, _manager.CheckUnreadMail);

            _go = selfTransform.FindChild("RightPanel/ActiveValue_Btn/Image").gameObject;                 //活跃度按钮
            _controller.AddControlledObject(_go, _manager.CheckLivenessAward);

            _go = selfTransform.FindChild("LeftPanel/LeftDynamicPanel/HeroItem/Image").gameObject;        //英雄按钮
            _controller.AddControlledObject(_go, _manager.CheckUpgradableHeroInTeam,
                                            _manager.CheckAdvancedHeroInTeam,
                                            _manager.CheckHeroRuneInTeam,
                                            _manager.CheckAttributeTrainInTeam,
                                            _manager.CheckSkillUpgradeInTeam
                                            );

            _go = selfTransform.FindChild("LeftPanel/LeftDynamicPanel/knpItem/Image").gameObject;         //背包按钮
            _controller.AddControlledObject(_go, _manager.CheckIsNewCommon, _manager.CheckIsNewRune);

            _go = selfTransform.FindChild("LeftPanel/LeftDynamicPanel/FormItem/Image").gameObject;        //阵型按钮
            _controller.AddControlledObject(_go, _manager.CheckTeamNoMember);

            _go = selfTransform.FindChild("LeftPanel/LeftDynamicPanel/ShopItem/Image").gameObject;        //商店按钮
            _controller.AddControlledObject(_go, _manager.CheckNonPurchasedGiftSet);

            _go = selfTransform.FindChild("LeftPanel/LeftDynamicPanel/AtlasItem/Image").gameObject;       //图鉴按钮
            int _atlasItem = _controller.AddControlledObject(_go, _manager.CheckHandbookAward);

            _go         = selfTransform.FindChild("LeftPanel/LeftDynamicPanel/ExpItem/Image").gameObject; //历练按钮
            m_TestIndex = _controller.AddControlledObject(_go, _manager.CheckLimitTest, _manager.CheckWorldBoss);

            _go = selfTransform.FindChild("LeftPanel/LeftDynamicPanel/PlayingItem/Image").gameObject;     //玩法按钮
            int _playingItem = _controller.AddControlledObject(_go, _manager.CheckExploreAward, _manager.CheckInGetPowerTime, _manager.CheckSacredAltar);

            _go = selfTransform.FindChild("LeftPanel/LeftDynamicPanel/FlashTips").gameObject;
            _controller.AddParentCtrlObjUnit(_go, _atlasItem, m_TestIndex, _playingItem);

            _go = selfTransform.FindChild("ActivityOverview/TipsImage").gameObject;
            _controller.AddControlledObject(_go, () => false);

            //_go = selfTransform.FindChild("TopPanel/PlayerInfo/MonthCardBtn/TipsImage").gameObject;
            //_controller.AddControlledObject(_go, _manager.CheckUnclaimedMonthCard);

            return(_controller);
        }
Ejemplo n.º 4
0
        IFunctionTipsController CreateFunctionTipsController()
        {
            GameObject             _go, _goRune;
            FunctionTipsController _controller = new FunctionTipsController();

            var _manager = FunctionTipsManager.GetInstance();

            _go = selfTransform.FindChild("UI_BG_Top/BtnGroup/UI_Btn_Prop/TipsImage").gameObject;
            _controller.AddControlledObject(_go, _manager.CheckIsNewCommon);
            _goRune = selfTransform.FindChild("UI_BG_Top/BtnGroup/UI_Btn_Rune/TipsImage").gameObject;
            _controller.AddControlledObject(_goRune, _manager.CheckIsNewRune);
            return(_controller);
        }
Ejemplo n.º 5
0
    //生成功能提示控制器
    IFunctionTipsController CreateFunctionTipsController()
    {
        var _manager = FunctionTipsManager.GetInstance();

        if (_manager == null)
        {
            return(null);
        }

        FunctionTipsControllerBoolArrayType _controller =
            new FunctionTipsControllerBoolArrayType(m_TipsImageArray, _manager.CheckEverySkillUpgrade);

        return(_controller);
    }
Ejemplo n.º 6
0
    //生成功能提示控制器
    IFunctionTipsController CreateFunctionTipsController()
    {
        var _manager = FunctionTipsManager.GetInstance();

        if (_manager == null)
        {
            return(null);
        }

        FunctionTipsControllerBoolArrayType _controller =
            new FunctionTipsControllerBoolArrayType(m_PropertyTipsArray, _manager.CheckEveryAttributeTrain);


        return(_controller);
    }
Ejemplo n.º 7
0
    //生成功能提示控制器
    IFunctionTipsController CreateFunctionTipsController()
    {
        GameObject             _go;
        FunctionTipsController _controller = new FunctionTipsController();

        var _manager = FunctionTipsManager.GetInstance();

        _go = selfTransform.FindChild("Layout/LengendWarBtn/FlashTips").gameObject;
        _controller.AddControlledObject(_go, _manager.CheckWorldBoss);

        _go = selfTransform.FindChild("Layout/LimitTestBtn/FlashTips").gameObject;
        _controller.AddControlledObject(_go, _manager.CheckLimitTest);

        return(_controller);
    }
Ejemplo n.º 8
0
    private void RefreshController()
    {
        if (m_TipsController == null)
        {
            return;
        }

        if (FunctionTipsManager.GetInstance().CheckHeroIsInDefaultTeam())
        {
            m_TipsController.Refresh();
        }
        else
        {
            m_TipsController.CloseAllTips();
        }
    }
Ejemplo n.º 9
0
    //生成功能提示控制器
    IFunctionTipsController CreateFunctionTipsController()
    {
        var _manager = FunctionTipsManager.GetInstance();

        if (_manager == null)
        {
            return(null);
        }

        FunctionTipsController _controller = new FunctionTipsController();

        _controller.AddControlledObject(m_RecruitTipsImage, _manager.CheckHeroRecruitFree);
        _controller.AddControlledObject(m_RelicTipsImage, _manager.CheckRelicFreeCount);

        return(_controller);
    }
Ejemplo n.º 10
0
    //生成功能提示控制器
    IFunctionTipsController CreateFunctionTipsController()
    {
        GameObject             _go;
        FunctionTipsController _controller = new FunctionTipsController();

        var _manager = FunctionTipsManager.GetInstance();

        _go = selfTransform.FindChild("UI_Main/GetPowerBtn/FlashTips").gameObject;
        _controller.AddControlledObject(_go, _manager.CheckInGetPowerTime);

        _go = selfTransform.FindChild("UI_Main/SacredAltarBtn/FlashTips").gameObject;
        _controller.AddControlledObject(_go, _manager.CheckSacredAltar);

        _go = selfTransform.FindChild("UI_Main/ExplorationBtn/FlashTips").gameObject;
        _controller.AddControlledObject(_go, _manager.CheckExploreAward);

        return(_controller);
    }
Ejemplo n.º 11
0
    public override void InitUIData()
    {
        _instance = this;
        base.InitUIData();
        allHeroMoney = selfTransform.FindChild("All").GetComponent <Text>();
        MsgBoxGroup  = selfTransform.FindChild("MsgBoxGroup");
        //属性一
        propertyType1   = selfTransform.FindChild("AttributeItem1/PropertyType").GetComponent <Text>();
        propertySlider1 = selfTransform.FindChild("AttributeItem1/HPSlider").GetComponent <Slider>();
        addPropertyBtn1 = selfTransform.FindChild("AttributeItem1/DevelopButton").GetComponent <Button>();
        maxPropertyBtn1 = selfTransform.FindChild("AttributeItem1/UpperBtn").GetComponent <Button>();
        addValue1       = selfTransform.FindChild("AttributeItem1/AddValue").GetComponent <Text>();
        currentValue1   = selfTransform.FindChild("AttributeItem1/CurrentValue").GetComponent <Text>();
        allValue1       = selfTransform.FindChild("AttributeItem1/AllValue").GetComponent <Text>();
        needValue1      = selfTransform.FindChild("AttributeItem1/NeedValue").GetComponent <Text>();
        addPropertyBtn1.onClick.AddListener(new UnityEngine.Events.UnityAction(AddPropertyBtn1));
        maxPropertyBtn1.onClick.AddListener(new UnityEngine.Events.UnityAction(MaxPropertyBtn));
        maxPropertyBtn1.gameObject.SetActive(false);
        //属性二
        propertyType2   = selfTransform.FindChild("AttributeItem2/PropertyType").GetComponent <Text>();
        propertySlider2 = selfTransform.FindChild("AttributeItem2/HPSlider").GetComponent <Slider>();
        addPropertyBtn2 = selfTransform.FindChild("AttributeItem2/DevelopButton").GetComponent <Button>();
        maxPropertyBtn2 = selfTransform.FindChild("AttributeItem2/UpperBtn").GetComponent <Button>();
        addValue2       = selfTransform.FindChild("AttributeItem2/AddValue").GetComponent <Text>();
        currentValue2   = selfTransform.FindChild("AttributeItem2/CurrentValue").GetComponent <Text>();
        allValue2       = selfTransform.FindChild("AttributeItem2/AllValue").GetComponent <Text>();
        needValue2      = selfTransform.FindChild("AttributeItem2/NeedValue").GetComponent <Text>();
        addPropertyBtn2.onClick.AddListener(new UnityEngine.Events.UnityAction(AddPropertyBtn2));
        maxPropertyBtn2.onClick.AddListener(new UnityEngine.Events.UnityAction(MaxPropertyBtn));
        maxPropertyBtn2.gameObject.SetActive(false);
        //属性三
        propertyType3   = selfTransform.FindChild("AttributeItem3/PropertyType").GetComponent <Text>();
        propertySlider3 = selfTransform.FindChild("AttributeItem3/HPSlider").GetComponent <Slider>();
        addPropertyBtn3 = selfTransform.FindChild("AttributeItem3/DevelopButton").GetComponent <Button>();
        maxPropertyBtn3 = selfTransform.FindChild("AttributeItem3/UpperBtn").GetComponent <Button>();
        addValue3       = selfTransform.FindChild("AttributeItem3/AddValue").GetComponent <Text>();
        currentValue3   = selfTransform.FindChild("AttributeItem3/CurrentValue").GetComponent <Text>();
        allValue3       = selfTransform.FindChild("AttributeItem3/AllValue").GetComponent <Text>();
        needValue3      = selfTransform.FindChild("AttributeItem3/NeedValue").GetComponent <Text>();
        addPropertyBtn3.onClick.AddListener(new UnityEngine.Events.UnityAction(AddPropertyBtn3));
        maxPropertyBtn3.onClick.AddListener(new UnityEngine.Events.UnityAction(MaxPropertyBtn));
        maxPropertyBtn3.gameObject.SetActive(false);
        //属性四
        propertyType4   = selfTransform.FindChild("AttributeItem4/PropertyType").GetComponent <Text>();
        propertySlider4 = selfTransform.FindChild("AttributeItem4/HPSlider").GetComponent <Slider>();
        addPropertyBtn4 = selfTransform.FindChild("AttributeItem4/DevelopButton").GetComponent <Button>();
        maxPropertyBtn4 = selfTransform.FindChild("AttributeItem4/UpperBtn").GetComponent <Button>();
        addValue4       = selfTransform.FindChild("AttributeItem4/AddValue").GetComponent <Text>();
        currentValue4   = selfTransform.FindChild("AttributeItem4/CurrentValue").GetComponent <Text>();
        allValue4       = selfTransform.FindChild("AttributeItem4/AllValue").GetComponent <Text>();
        needValue4      = selfTransform.FindChild("AttributeItem4/NeedValue").GetComponent <Text>();
        addPropertyBtn4.onClick.AddListener(new UnityEngine.Events.UnityAction(AddPropertyBtn4));
        maxPropertyBtn4.onClick.AddListener(new UnityEngine.Events.UnityAction(MaxPropertyBtn));
        maxPropertyBtn4.gameObject.SetActive(false);
        GameEventDispatcher.Inst.addEventListener(GameEventID.Net_RefreshHero, ShowAllProperty);
        //texiao1.SetActive(false);
        //texiao2.SetActive(false);
        //texiao3.SetActive(false);
        //texiao4.SetActive(false);

        m_FunctionTipsManager  = FunctionTipsManager.GetInstance();
        m_PropertyTipsArray    = new GameObject[4];
        m_PropertyTipsArray[0] = selfTransform.FindChild("AttributeItem1/DevelopButton/TipsImage").gameObject;
        m_PropertyTipsArray[1] = selfTransform.FindChild("AttributeItem2/DevelopButton/TipsImage").gameObject;
        m_PropertyTipsArray[2] = selfTransform.FindChild("AttributeItem3/DevelopButton/TipsImage").gameObject;
        m_PropertyTipsArray[3] = selfTransform.FindChild("AttributeItem4/DevelopButton/TipsImage").gameObject;
        GameEventDispatcher.Inst.addEventListener(GameEventID.U_HeroChangeTarget, OnSelectCardHeroChanged);

        GameEventDispatcher.Inst.addEventListener(GameEventID.Net_RefreshHero, RefreshTipsController);
        GameEventDispatcher.Inst.addEventListener(GameEventID.U_HeroChangeTarget, RefreshTipsController);
    }
Ejemplo n.º 12
0
    public override void InitUIData()
    {
        base.InitUIData();
        _instance = this;

        m_RuneAttriPos = selfTransform.FindChild("RuneDetail/RuneAttriPos");
        m_RuneItemPos  = selfTransform.FindChild("RuneDetail/RuneInfo/Panel/RunItem1");

        mRunes = new RuneIconItem[(int)EM_RUNE_POINT.EM_RUNE_POINT_NUMBER];
        for (int i = 0, j = (int)EM_RUNE_POINT.EM_RUNE_POINT_NUMBER; i < j; i++)
        {
            Transform trans = transform.FindChild("RuneGroup/RunItem" + i);
            mRunes[i] = new RuneIconItem(trans);
            mRunes[i].SetIsSpecial(i == (int)EM_RUNE_POINT.EM_RUNE_POINT_SPECIAL);
        }

        mRuneGoupItems = new UI_HeroRuneGroupItem[4];
        for (int i = 0; i < 4; i++)
        {
            Transform trans = transform.FindChild("RuneRewards/runesGrid/RunRewardsItem" + i);
            mRuneGoupItems[i] = new UI_HeroRuneGroupItem(trans);
        }

        mRuneBounsBtn = transform.FindChild("Rune bonusBtn").GetComponent <Button>();
        mRuneEffObj   = transform.FindChild("MagicArray01").gameObject;

        mRuneAttrImgs = new Image[3];
        mRuneDetails  = new Text[3];
        mRuneValues   = new Text[3];

        for (int i = 0; i < 3; i++)
        {
            mRuneAttrImgs[i] = transform.FindChild("RuneRewards/attriGrid/RunReward" + i + "_txt/Image").GetComponent <Image>();
            mRuneDetails[i]  = transform.FindChild("RuneRewards/attriGrid/RunReward" + i + "_txt/Left_Txt").GetComponent <Text>();
            mRuneValues[i]   = transform.FindChild("RuneRewards/attriGrid/RunReward" + i + "_txt/Right_Txt").GetComponent <Text>();
        }
        mMsgBoxTrans     = transform.FindChild("MsgBoxObj");
        mAttriTitleTxt   = transform.FindChild("Items/AttriTitle").GetComponent <Text>();
        mRuneAttriObj    = transform.FindChild("Items/AttriPair").gameObject;
        mAddRuneAttriObj = transform.FindChild("Items/AddAttriPair").gameObject;

        mRuneDetailObj = transform.FindChild("RuneDetail").gameObject;
        //Transform temp = transform.FindChild("RuneDetail/RuneInfo/Panel/RunItem1");
        //mRuneDetailItem = new RuneIconItem(temp);
        mUserObj        = transform.FindChild("RuneDetail/RuneInfo/Panel/UserName").gameObject;
        mSpecHeroName   = transform.FindChild("RuneDetail/RuneInfo/Panel/SpecialHeroName").GetComponent <Text>();
        mRuneName       = transform.FindChild("RuneDetail/RuneInfo/Panel/RuneName_txt/Name_txt").GetComponent <Text>();
        mUserName       = transform.FindChild("RuneDetail/RuneInfo/Panel/UserName/UserName_txt").GetComponent <Text>();
        mCloseDetailBtn = transform.FindChild("RuneDetail/RuneInfo/CloseBtn/Image").GetComponent <Button>();
        mStrenthBtn     = transform.FindChild("RuneDetail/RuneInfo/StrenthBtn").GetComponent <Button>();
        mStrenthTxt     = transform.FindChild("RuneDetail/RuneInfo/StrenthBtn/Text").GetComponent <Text>();
        mIdentifyBtn    = transform.FindChild("RuneDetail/RuneInfo/IdentifyBtn").GetComponent <Button>();
        mIdentifyTxt    = transform.FindChild("RuneDetail/RuneInfo/IdentifyBtn/Text").GetComponent <Text>();
        mChangeBtn      = transform.FindChild("RuneDetail/RuneInfo/ChangeBtn").GetComponent <Button>();
        mChangeTxt      = transform.FindChild("RuneDetail/RuneInfo/ChangeBtn/Text").GetComponent <Text>();
        mAttriList      = transform.FindChild("RuneDetail/RuneInfo/Panel/Attris/AttriList").gameObject;
        mAttriDetailTxt = transform.FindChild("Items/LineTxt").gameObject;

        mPropRuneQueue   = new List <UI_RuneAttriItem>();
        mPropRuneObj     = transform.FindChild("RuneProp").gameObject;
        mPropNoRuneObj   = transform.FindChild("RuneProp/NoRuneObj").gameObject;
        mPropNoRuneTxt   = transform.FindChild("RuneProp/NoRuneObj/Text").GetComponent <Text>();
        mPropCloseBtn    = transform.FindChild("RuneProp/CloseBtn").GetComponent <Button>();
        mPropCloseBtnTxt = transform.FindChild("RuneProp/CloseBtn/Text").GetComponent <Text>();
        mPropListTrans   = transform.FindChild("RuneProp/Panel/AttriList");
        mPropItemTrans   = transform.FindChild("RuneProp/Items/PropItem");

        //mRuneIdentityObj = transform.FindChild("RuneIdentify").gameObject;
        //mRuneStrenthObj = transform.FindChild("RuneStrenth").gameObject;

        mRunes[0].AddIconClickListener(OnRuneBtnClick0);
        mRunes[1].AddIconClickListener(OnRuneBtnClick1);
        mRunes[2].AddIconClickListener(OnRuneBtnClick2);
        mRunes[3].AddIconClickListener(OnRuneBtnClick3);
        mRunes[4].AddIconClickListener(OnRuneBtnClick4);
        mRunes[5].AddIconClickListener(OnRuneBtnClick5);

        mRuneBounsBtn.onClick.AddListener(OnRunePropBtnClick);
        mCloseDetailBtn.onClick.AddListener(OnCloseRuneDetailBtnClick);
        mStrenthBtn.onClick.AddListener(OnStrenthBtnClick);
        mIdentifyBtn.onClick.AddListener(OnIdentifyBtnClick);
        mChangeBtn.onClick.AddListener(OnChangeBtnClick);
        mPropCloseBtn.onClick.AddListener(OnRunePropCloseBtnClick);


        //功能提示
        m_FunctionTipsManager = FunctionTipsManager.GetInstance();
        m_TipsImageArray      = new GameObject[(int)EM_RUNE_POINT.EM_RUNE_POINT_NUMBER];
        m_TipsImageArray[(int)EM_RUNE_POINT.EM_RUNE_POINT_COMMON1] = selfTransform.FindChild("RuneGroup/RunItem0/TipsImage").gameObject;
        m_TipsImageArray[(int)EM_RUNE_POINT.EM_RUNE_POINT_COMMON2] = selfTransform.FindChild("RuneGroup/RunItem1/TipsImage").gameObject;
        m_TipsImageArray[(int)EM_RUNE_POINT.EM_RUNE_POINT_COMMON3] = selfTransform.FindChild("RuneGroup/RunItem2/TipsImage").gameObject;
        m_TipsImageArray[(int)EM_RUNE_POINT.EM_RUNE_POINT_COMMON4] = selfTransform.FindChild("RuneGroup/RunItem3/TipsImage").gameObject;
        m_TipsImageArray[(int)EM_RUNE_POINT.EM_RUNE_POINT_COMMON5] = selfTransform.FindChild("RuneGroup/RunItem4/TipsImage").gameObject;
        m_TipsImageArray[(int)EM_RUNE_POINT.EM_RUNE_POINT_SPECIAL] = selfTransform.FindChild("RuneGroup/RunItem5/TipsImage").gameObject;

        GameEventDispatcher.Inst.addEventListener(GameEventID.U_HeroChangeTarget, OnSelectCardHeroChanged);
        GameEventDispatcher.Inst.addEventListener(GameEventID.Net_RefreshItem, OnItemRefresh);
        GameEventDispatcher.Inst.addEventListener(GameEventID.Net_RefreshHero, OnCardHeroDataChanged);

        GameEventDispatcher.Inst.addEventListener(GameEventID.U_HeroChangeTarget, RefreshTips);
        GameEventDispatcher.Inst.addEventListener(GameEventID.Net_RefreshItem, RefreshTips);
        GameEventDispatcher.Inst.addEventListener(GameEventID.Net_RefreshHero, RefreshTips);

        InitUIString();

        //mStrenthTxt.gameObject.layer = LayerMask.NameToLayer("UI");
        GameEventDispatcher.Inst.addEventListener(GameEventID.G_Guide_Continue, ShowNewGuide);
    }