コード例 #1
0
    /** 初始化容器 */
    private IEnumerator initContent(int tapIndex)
    {
//		GameObject lastPoint = contents [this.currentTapIndex];
//		if(lastPoint.transform.childCount>0)
//			Utils.RemoveAllChild (lastPoint.transform);
        resetContentsActive();
        GameObject content = getContent(tapIndex);

        switch (tapIndex)
        {
        case TAP_HUNT_CONTENT:
            StarSoulHuntContent ssh = content.GetComponent <StarSoulHuntContent> ();
            ssh.init(this, PlayerPrefs.GetInt(UserManager.Instance.self.uid + PlayerPrefsComm.STARSOUL_HUNT_TAP));
            ssh.updateNebulaEffectUI();    //更新星魂特效视图
            break;

        case TAP_EQUIP_CONTENT:
            StarSoulEquipContent ec = content.GetComponent <StarSoulEquipContent> ();
            ec.init(this, selectIndex, card);
            break;

        case TAP_STORE_CONTENT:
            StarSoulStoreContent ssc = content.GetComponent <StarSoulStoreContent> ();
            ssc.init(this, ButtonStoreStarSoul.ButtonStateType.Power);
            break;

        case TAP_MAKE_CONTENT:
            StarSoulMakeContent msc = content.GetComponent <StarSoulMakeContent> ();
            msc.init();
            break;
        }
        GuideManager.Instance.guideEvent();
        MaskWindow.UnlockUI();
        yield break;
    }
コード例 #2
0
    public void initContent(Card card, StarSoul starSoul, ButtonStoreStarSoul.ButtonStateType type)
    {
        //starSoulStorecontent.SetActive(false);
        Utils.RemoveAllChild(starSoulStorecontent.transform);
        GameObject           content = NGUITools.AddChild(starSoulStorecontent, contentPrefab);
        StarSoulStoreContent ssc     = content.GetComponent <StarSoulStoreContent> ();
        //筛选条件
        SortCondition sc = new SortCondition();

        sc.sortCondition = new Condition(SortType.SORT);
        sc.sortCondition.conditions.Add(SortType.SORT_QUALITYDOWN);
        int [] intArray = StarSoulManager.Instance.getCardSoulExistType(card, starSoul);
        //屏蔽掉筛选的同类型星魂
        sc.addSiftCondition(new Condition(SortType.STARSOUL_TYPE, intArray));
        ssc.sc = sc;
        ssc.init(this, type);
    }