コード例 #1
0
ファイル: QuickChatUI.cs プロジェクト: mengtest/DragonBallNew
    void CreateQuickChatCell(string strText)
    {
        Object prefab = PrefabLoader.loadFromPack("ZQ/QuickChatCell");

        if (prefab != null)
        {
            GameObject obj = Instantiate(prefab) as GameObject;
            RED.AddChild(obj, m_grid.gameObject);
            QuickChatCell cell = obj.GetComponent <QuickChatCell>();
            cell.SetText(strText);
        }
    }
コード例 #2
0
ファイル: MonFragUI.cs プロジェクト: mengtest/DragonBallNew
    public static void OpenUI(MonsterData data)
    {
        Object prefab = PrefabLoader.loadFromPack("ZQ/MonFragUI");

        if (prefab != null)
        {
            GameObject obj = Instantiate(prefab) as GameObject;
            RED.AddChild(obj, DBUIController.mDBUIInstance._TopRoot);
            mInstance = obj.GetComponent <MonFragUI> ();
            mInstance.InitUI(data);
        }
    }
コード例 #3
0
ファイル: NewDungeons.cs プロジェクト: mengtest/DragonBallNew
    //重置关卡需要花费的钻石
    public int GetResetFloorCost(int resetTime)
    {
        RED.LogWarning("resetTime :: " + resetTime);

        RED.LogWarning("count  " + dicResetFloor.Count);
        if (dicResetFloor.ContainsKey(resetTime))
        {
            RED.LogWarning("costStone :: " + dicResetFloor [resetTime].cost_D);
            return(dicResetFloor [resetTime].cost_D);
        }
        return(0);
    }
コード例 #4
0
 public static UIDragonVipTequan CreateShangChengPanel()
 {
     UnityEngine.Object obj = PrefabLoader.loadFromPack("LS/pbLSDragonBallMallVipTequan");
     if (obj != null)
     {
         GameObject        go = Instantiate(obj) as GameObject;
         UIDragonVipTequan cc = go.GetComponent <UIDragonVipTequan>();
         RED.TweenShowDialog(go);
         return(cc);
     }
     return(null);
 }
コード例 #5
0
ファイル: Card3DUI.cs プロジェクト: mengtest/DragonBallNew
    public CRLuo_ShowStage Show3DCard(Monster mon, bool bPlayAnim = true, CRLuo_ShowStage _ShowStage = null)
    {
        m_data = mon;
        SetMonsterModel(_ShowStage);
        if (bPlayAnim)
        {
            m_stars.transform.localScale      = Vector3.zero;
            m_extStars.transform.localScale   = Vector3.zero;
            m_txtAtk.transform.localScale     = Vector3.zero;
            m_txtDef.transform.localScale     = Vector3.zero;
            m_txtMonName.transform.localScale = Vector3.zero;

            RED.SetActive(true, this.gameObject);

            m_Animator.SetFloat("aa", 20.0f);
            m_Animator.SetFloat("Reset", 0.0f);
            m_Animator.SetFloat("Time", 10.0f);

            StartCoroutine("PlayMoveAnim");
        }
        else
        {
            Vector3 pos = m_stars.transform.localPosition;
            pos.x = -130;
            if (m_data.config.jinjie == 1)
            {
                m_stars.m_pos = ENUM_POS.right;
                pos.x         = -150;
            }
            else
            {
                m_stars.m_pos = ENUM_POS.left;
            }
            m_stars.transform.localPosition    = pos;
            m_extStars.transform.localPosition = pos;
            RED.SetActive(mon.config.jinjie == 1, m_extStars.gameObject);
            m_stars.SetStar(mon.Star);
            m_extStars.SetStar(6);

            m_stars.transform.localScale      = Vector3.one;
            m_extStars.transform.localScale   = Vector3.one;
            m_txtAtk.transform.localScale     = Vector3.one;
            m_txtDef.transform.localScale     = Vector3.one;
            m_txtMonName.transform.localScale = Vector3.one;

            m_Animator.SetFloat("aa", 0.0f);
            m_Animator.SetFloat("Reset", 0.0f);
            m_Animator.SetFloat("Time", 10.0f);
        }

        InitAttrs();
        return(mShowOne);
    }
コード例 #6
0
ファイル: LoginMethod.cs プロジェクト: mengtest/DragonBallNew
    public void LoginSuc(string uniqueId)
    {
        RED.Log("360登录成功");

        m_AccountData.maket       = Market.QI_HOO;
        m_AccountData.platform    = Platform.Android;
        m_AccountData.uniqueId    = uniqueId;
        m_AccountData.lType       = LoginType.TYPE_THIRDPARTY;
        m_AccountData.loginStatus = ThirdLoginState.LoginFinish;

        m_LoginCallback(m_AccountData);
    }
コード例 #7
0
 public static void OpenUI()
 {
     if (_instance == null)
     {
         Object prefab = PrefabLoader.loadFromPack("ZQ/RadarTeamUI");
         if (prefab != null)
         {
             GameObject obj = Instantiate(prefab) as GameObject;
             RED.AddChild(obj, DBUIController.mDBUIInstance._bottomRoot);
         }
     }
 }
コード例 #8
0
    //star >= 1 && star <= 7
    public UISprite getBallGo(int star)
    {
        Object     obj    = getBallObj;
        GameObject go     = Instantiate(obj, StartPosList[star - 1].position, Quaternion.identity) as GameObject;
        UISprite   sprite = go.GetComponent <UISprite>();

        sprite.spriteName = "dragon-" + star.ToString();

        RED.AddChild(go, Rt);

        return(sprite);
    }
コード例 #9
0
    public void OpenLevelUpUnlock(bool m_IsUnlockLevelUp)
    {
        if (Core.Data.guideManger.isGuiding)
        {
            return;
        }
        foreach (DeblockingBuildData data in mDeblockingBuildDataDic.Values)
        {
            if (!m_IsUnlockLevelUp && mFloorRecord >= Core.Data.newDungeonsManager.lastFloorId)
            {
                break;
            }
            if (m_IsUnlockLevelUp)
            {
                if (data.type == 0 && data.num == Core.Data.playerManager.Lv)
                {
                    for (int i = 0; i < data.name.Length; i++)
                    {
                        mCurDeblockingName.Add(data.name[i]);
                        mCurDeblockingIcon.Add(data.icon[i]);
                        mCurDeblockingAtlas.Add(data.deblockingType);
                    }
                }
            }
            if (mFloorRecord < Core.Data.newDungeonsManager.lastFloorId)
            {
                if (data.type == 1 && data.num == Core.Data.newDungeonsManager.lastFloorId)
                {
                    for (int i = 0; i < data.name.Length; i++)
                    {
                        mCurDeblockingName.Add(data.name[i]);
                        mCurDeblockingIcon.Add(data.icon[i]);
                        mCurDeblockingAtlas.Add(data.deblockingType);
                    }
                }
            }
        }
        if (mFloorRecord != Core.Data.newDungeonsManager.lastFloorId)
        {
            mFloorRecord = Core.Data.newDungeonsManager.lastFloorId;
        }



        if (mCurDeblockingName.Count != mCurDeblockingIcon.Count)
        {
            RED.LogWarning("Excel has error");
            return;
        }

        BeginUnlock();
    }
コード例 #10
0
    /// <summary>
    /// 根据背包元素类型 来确定当前星级的元素是什么(人物,道具,装备等)
    /// </summary>
    /// <param name="node">Node.</param>
    /// <param name="iType">I type.</param>
    /// <param name="parent">Parent.</param>
    void checkNodeBoxItem(SQYNodeForBI node, EMItemType iType, GameObject parent)
    {
        switch (iType)
        {
        case EMItemType.Charator:
            if (node._charator == null)
            {
                node._charator          = SQYBICharator.CreateBICharator();
                node._charator.OnClick += this.On_Click;
            }
            break;

        case EMItemType.Equipment:
            if (node._equipment == null)
            {
                node._equipment          = SQYBIEquipment.CreateBIEquipment();
                node._equipment.OnClick += this.On_Click;
            }
            break;

        case EMItemType.Gem:
            if (node._gem == null)
            {
                node._gem          = SQYBIGem.CreateBIGem();
                node._gem.OnClick += this.On_Click;
            }
            break;

        case EMItemType.Props:
            if (node._props == null)
            {
                node._props          = SQYBIProps.CreateBIProps();
                node._props.OnClick += this.On_Click;
            }
            break;

        case EMItemType.AtkFrag:
        case EMItemType.DefFrag:
        case EMItemType.MonFrag:
            if (node._soul == null)
            {
                node._soul          = SQYBISoul.CreateBISoul();
                node._soul.OnClick += this.On_Click;
            }
            break;
        }

        node.resetItemType(iType);        //根据类型 把当前的元素重设.
        RED.AddChild(node._boxItem.gameObject, parent);
        node._boxItem.myParent = this;
        node._boxItem.myNode   = node;
    }
コード例 #11
0
    void OnBtnClickChangePos()
    {
        RED.SetBtnSprite(m_btnChangePos, BTN_SEL);
        RED.SetBtnSprite(m_btnSwapTeam, BTN_UNSEL);

        m_txtChgPos.color   = SEL_COLOR;
        m_txtSwapTeam.color = UNSEL_COLOR;

        m_modifyMonsterUI.SetShow(true);
        m_swapTeamUI.SetShow(false);
        bar.gameObject.SetActive(true);
        alphaSidePanel.gameObject.SetActive(true);
    }
コード例 #12
0
 public static void OpenUI()
 {
     if (_Instance == null)
     {
         Object prefab = PrefabLoader.loadFromPack("LS/MissionSysRoot");
         if (prefab != null)
         {
             GameObject obj = Instantiate(prefab) as GameObject;
             RED.AddChild(obj, DBUIController.mDBUIInstance._TopRoot);
             _Instance = obj.GetComponent <MissionSystem> ();
         }
     }
 }
コード例 #13
0
 public static void OpenUI()
 {
     UnityEngine.Object obj = PrefabLoader.loadFromPack("LS/pbLSFirstRechargePanel");
     if (obj != null)
     {
         GameObject go = Instantiate(obj) as GameObject;
         if (go != null)
         {
             RED.AddChild(go, DBUIController.mDBUIInstance._TopRoot);
             mInstance = go.GetComponent <UIFirstRechargePanel>();
         }
     }
 }
コード例 #14
0
ファイル: GPSRewardUI.cs プロジェクト: mengtest/DragonBallNew
 public static void OpenUI()
 {
     if (_instace == null)
     {
         Object     obj = PrefabLoader.loadFromPack("ZQ/GPSRewardUI");
         GameObject ui  = Instantiate(obj) as GameObject;
         RED.AddChild(ui, UICamera.currentCamera.gameObject);
     }
     else
     {
         mInstance.SetShow(true);
     }
 }
コード例 #15
0
 public override void SetActive(bool bShow)
 {
     RED.SetActive(bShow, this.gameObject);
     if (bShow)
     {
         StartCoroutine("StartTime");
         //InvokeRepeating ("StartTime",0,1f);
     }
     else
     {
         StopCoroutine("StartTime");
     }
 }
コード例 #16
0
    public void SetStar(int star)
    {
        int i = 0;

        for (; i < star; i++)
        {
            RED.SetActive(true, m_stars [i]);
        }
        for (; i < m_stars.Length; i++)
        {
            RED.SetActive(false, m_stars [i]);
        }
    }
コード例 #17
0
 public void SetShow(bool bShow)
 {
     if (m_bShow == bShow)
     {
         return;
     }
     m_bShow = bShow;
     RED.SetActive(m_bShow, this.gameObject);
     if (bShow)
     {
         InitUI();
     }
 }
コード例 #18
0
 public void InitUI(FateData data)
 {
     m_data = data;
     if (m_data != null)
     {
         m_txtFate.text = data.name;
     }
     else
     {
         m_txtFate.text = "";
     }
     RED.SetActive(true, this.gameObject);
 }
コード例 #19
0
    public UILabel m_txtContent;                                        //

    public void SetText(string strTitle, string[] strText)
    {
        m_txtTitle.text = strTitle;
        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < strText.Length; i++)
        {
            sb.Append(strText [i]);
            sb.Append("\n");
        }
        m_txtContent.text = sb.ToString();
        RED.SetActive(true, this.gameObject);
    }
コード例 #20
0
ファイル: TemporyData.cs プロジェクト: mengtest/DragonBallNew
 //关闭/打开整个游戏的事件接收功能
 public void SetGameTouch(bool isCanTouch)
 {
     RED.Log("SetGameTouch[" + isCanTouch.ToString() + "]");
     if (DBUIController.mDBUIInstance != null)
     {
         DBUIController.mDBUIInstance.UITopAndBottomTouch = isCanTouch;
     }
     TempTouch = isCanTouch;
     if (BattleCamera.Instance != null)
     {
         BattleCamera.Instance.UITopAndBottomTouch = isCanTouch;
     }
 }
コード例 #21
0
    void dropBallAnim(GameObject father, bool isInleftArea = true)
    {
        Object     obj  = PrefabLoader.loadFromUnPack("Ban/DropBall", false);
        GameObject ball = Instantiate(obj) as GameObject;

        RED.AddChildResvere(ball, father);

        if (isInleftArea)
        {
            ball.transform.eulerAngles = new Vector3(0f, 0f, 0f);
        }
        Core.Data.soundManager.SoundFxPlay(SoundFx.FX_DragonBeadDrop);
    }
コード例 #22
0
    void ShowIcon()
    {
        if (m_nIndex >= m_data.Length)
        {
            return;
        }
        ItemOfReward reward = m_data [m_nIndex];

        if (reward.getCurType() == ConfigDataType.Monster)
        {
            Monster data = reward.toMonster(Core.Data.monManager);
            rewardName.text = data.config.name;
            AtlasMgr.mInstance.SetHeadSprite(rewardIcon, data.num.ToString());
        }
        else if (reward.getCurType() == ConfigDataType.Equip)
        {
            Equipment data = reward.toEquipment(Core.Data.EquipManager, Core.Data.gemsManager);
            rewardName.text       = data.ConfigEquip.name;
            rewardIcon.atlas      = AtlasMgr.mInstance.equipAtlas;
            rewardIcon.spriteName = data.Num.ToString();
        }
        else if (reward.getCurType() == ConfigDataType.Gems)
        {
            Gems data = reward.toGem(Core.Data.gemsManager);
            rewardName.text       = data.configData.name;
            rewardIcon.atlas      = AtlasMgr.mInstance.commonAtlas;
            rewardIcon.spriteName = data.configData.anime2D;
        }
        else if (reward.getCurType() == ConfigDataType.Item)
        {
            Item item = reward.toItem(Core.Data.itemManager);
            rewardName.text  = item.configData.name;
            rewardIcon.atlas = AtlasMgr.mInstance.itemAtlas;
//            rewardIcon.spriteName = item.RtData.num.ToString ();
            rewardIcon.spriteName = item.configData.iconID.ToString();
        }
        else if (reward.getCurType() == ConfigDataType.Frag)
        {
            Soul soul = reward.toSoul(Core.Data.soulManager);
            rewardName.text       = soul.m_config.name;
            rewardIcon.atlas      = AtlasMgr.mInstance.itemAtlas;
            rewardIcon.spriteName = soul.m_RTData.num.ToString();
        }
        else
        {
            RED.LogWarning("unknow reward type");
        }
        rewardIcon.MakePixelPerfect();

        rewardNum.text = ItemNumLogic.setItemNum(reward.num, rewardNum, rewardNum.gameObject.transform.parent.gameObject.GetComponent <UISprite>());  // yangchenguang
    }
コード例 #23
0
ファイル: BuildGetUI.cs プロジェクト: mengtest/DragonBallNew
    //wxl
    public void UpdateUI(Building data)
    {
        m_buildData = data;

        RED.SetActive(Core.Data.playerManager.RTData.curLevel >= data.config.limitLevel, this.gameObject);
        if (m_buildData.config.build_kind == BaseBuildingData.BUILD_KIND_PRODUCE)
        {
            if (m_buildData.RTData.dur <= 0)
            {
                if (m_buildData.RTData.openType != 0)
                {
                    if (m_buildData.RTData.robc != 0)
                    {
                        RED.SetActive(true, m_getHalfCoin);
                        RED.SetActive(false, m_getCoin, m_effect);
                    }
                    else
                    {
                        RED.SetActive(true, m_getCoin.gameObject, m_effect);
                        RED.SetActive(false, m_getHalfCoin);
                    }
                    RED.SetActive(m_buildData.RTData.dur > 0, m_tip);
                }
                else
                {
                    RED.SetActive(false, m_getCoin.gameObject, m_effect);
                    RED.SetActive(false, m_getHalfCoin);
                    RED.SetActive(false, m_tip);
                }
            }
            else
            {
                if (m_buildData.RTData.openType != 0)
                {
                    RED.SetActive(m_buildData.RTData.dur > 0, m_tip);
                }
                else
                {
                    RED.SetActive(false, m_tip);
                }

                RED.SetActive(false, m_getCoin, m_getHalfCoin, m_effect);
            }
        }
        else if (m_buildData.config.build_kind == BaseBuildingData.BUILD_KIND_BATTLE)
        {
            RED.SetActive(false, m_getCoin, m_getHalfCoin, m_effect);
            RED.SetActive(false, m_tip);
        }
//		RED.SetActive(m_buildData.RTData.dur > 0, m_tip);
    }
コード例 #24
0
ファイル: MonFragUI.cs プロジェクト: mengtest/DragonBallNew
    public void InitUI(MonsterData monData)
    {
        m_data = monData;

        AtlasMgr.mInstance.SetHeadSprite(m_spHead, m_data.ID.ToString());
        m_txtName.text = string.Format(Core.Data.stringManager.getString(5259), m_data.name);
        m_star.SetStar(m_data.star);
        m_subStar.SetStar(6);

        Monster        mon    = new Monster();
        RuntimeMonster rtData = new RuntimeMonster();

        rtData.Attribute = MonsterAttribute.FIRE;
        rtData.curLevel  = 30;
        mon.RTData       = rtData;
        mon.config       = m_data;
        mon.num          = m_data.ID;

        for (int i = 0; i < m_skills.Length; i++)
        {
            RED.SetActive(false, m_skills [i].gameObject);
        }

        for (int i = 0; i < mon.getSkill.Count; i++)
        {
            m_skills [i].InitSkill(mon.getSkill[i]);
        }

        m_txtAtk.text = ((int)(m_data.atk)).ToString();
        m_txtDef.text = ((int)m_data.def).ToString();

        int maxAtk = (int)(m_data.atk + 59 * m_data.atkGrowth);
        int maxDef = (int)(m_data.def + 59 * m_data.defGrowth);

        m_txtMaxAtk.text = string.Format(Core.Data.stringManager.getString(5262), maxAtk);
        m_txtMaxDef.text = string.Format(Core.Data.stringManager.getString(5262), maxDef);

        for (int i = 0; i < m_fates.Length; i++)
        {
            RED.SetActive(false, m_fates [i].gameObject);
        }

        FateData[] fd = new FateData[4];
        for (int i = 0; i < m_data.fateID.Length; i++)
        {
            fd[i] = Core.Data.fateManager.getFateDataFromID(m_data.fateID[i]);
            m_fates[i].InitUI(fd[i]);
        }

        m_txtDesp.text = m_data.description;
    }
コード例 #25
0
ファイル: EmotionUI.cs プロジェクト: mengtest/DragonBallNew
    public static EmotionUI OpenUI()
    {
        Object prefab = PrefabLoader.loadFromPack("ZQ/EmotionUI");

        if (prefab != null)
        {
            GameObject obj = Instantiate(prefab) as GameObject;
            RED.AddChild(obj, UIMessageMain.Instance.gameObject);
            EmotionUI emotion = obj.GetComponent <EmotionUI>();
            obj.transform.localPosition = new Vector3(62f, 0f, 0f);
            return(emotion);
        }
        return(null);
    }
コード例 #26
0
ファイル: BuildItem.cs プロジェクト: mengtest/DragonBallNew
    public void CreateWorkdingUI()
    {
        UnityEngine.Object prefab = PrefabLoader.loadFromPack(BASE_PREFAB_PATH + "Smoke", false);
        if (prefab != null)
        {
            GameObject obj = Instantiate(prefab) as GameObject;
            RED.AddChild(obj, this.gameObject);
//			m_workUI = obj.GetComponent<BuildWorkUI>();
        }
        else
        {
            RED.LogWarning(BASE_PREFAB_PATH + "Smoke" + "not find");
        }
    }
コード例 #27
0
 void Awake()
 {
     for (int i = 0; i < lstAvatars.Count; i++)
     {
         SQYCharatorView cv = SQYCharatorView.CreateCharatorView();
         cv.mIndex = i;
         RED.AddChild(cv.gameObject, lstAvatars[i]);
         cv.OnDrag  += this.OnDrag;
         cv.OnPress += this.OnPress;
         cv.OnClick += this.OnClick;
         szHeadViews.Add(cv);
     }
     UIEventListener.Get(goZhuanPan).onDrag = this.OnDrag;
 }
コード例 #28
0
ファイル: SkillUpUI.cs プロジェクト: mengtest/DragonBallNew
    /// <summary>
    /// 显示界面并初始化
    /// </summary>
    /// <returns>The skill panel.</returns>
    /// <param name="root">Root.</param>
    public static SkillUpUI CreateSkillUpUI(Monster mon)
    {
        GameObject obj = PrefabLoader.loadFromPack("ZQ/SkillUpUI") as GameObject;

        if (obj != null)
        {
            GameObject go = Instantiate(obj) as GameObject;
            RED.AddChild(go, DBUIController.mDBUIInstance._TopRoot);
            SkillUpUI script = go.GetComponent <SkillUpUI>();
            script.m_monster = mon;
            return(script);
        }
        return(null);
    }
コード例 #29
0
 public static JCPVEPlotController OpenUI()
 {
     if (Instance == null)
     {
         Object prefab = PrefabLoader.loadFromPack("JC/PVPMapController");
         if (prefab != null)
         {
             GameObject obj = Instantiate(prefab) as GameObject;
             RED.AddChild(obj, DBUIController.mDBUIInstance._bottomRoot);
             Instance = obj.GetComponent <JCPVEPlotController>();
         }
     }
     return(Instance);
 }
コード例 #30
0
    public static AngryChgAnim createOne(int changed, GameObject GoParent)
    {
        Object obj = null;

        obj = PrefabLoader.loadFromUnPack("Ban/AngryChg", false);
        GameObject go = Instantiate(obj) as GameObject;

        RED.AddChild(go, GoParent);

        AngryChgAnim aca = go.GetComponent <AngryChgAnim>();

        aca.showAnim(changed);
        return(aca);
    }