Beispiel #1
0
        public void OnPlayerItemClick(PlayerCombatData item)
        {
            U3D_Render.EntityView ev = EntityFactory.getEntityViewByID(item.nEntityID);
            if (ev == null)
            {
                return;
            }

            CurrentPlayer = item;
            BottomView.ResetView();

            SetNumPromps(ev);
            SetSpellData();
            SetPersonBuyGoodsInfo();
            RestoreAllSpellCD();

            // 切换镜头
            SoldierCamera.MainInstance <SoldierCamera>().SwitchOBSoliderTarget(ev);

#if ENABLE_YUNYING_MODE
            SoldierCamera.MainInstance <SoldierCamera>().EnterOB_yunying(CameraMode.YUNYING_OBHeroLock);
#else
            SoldierCamera.MainInstance <SoldierCamera>().EnableOBMode(true);
#endif
        }
Beispiel #2
0
        //protected override void CountDownRepeatCallBack()
        //{
        //    base.CountDownRepeatCallBack();

        //    PlayerCombatData item = this.gameObject.GetComponent<PlayerCombatData>();
        //    item.summonerSkill3Image.fillAmount = (fOriginalTime - fCurTime) / (fOriginalTime);
        //}

        protected override void CountDownCompleteCallBack()
        {
            base.CountDownCompleteCallBack();

            PlayerCombatData item = this.gameObject.GetComponent <PlayerCombatData>();

            item.summonerSkill3Image.ResetToDefaultMaterial();
        }
Beispiel #3
0
        protected override void CountDownRepeatCallBack()
        {
            base.CountDownRepeatCallBack();

            PlayerCombatData item = this.gameObject.GetComponent <PlayerCombatData>();

            item.summonerSkill1Image.fillAmount = (fOriginalTime - fCurTime) / (fOriginalTime);
        }
Beispiel #4
0
        public void SetData(int camp, ref Dictionary <int, PlayerCombatData> dicPlayerData)
        {
            m_camp = camp;
            teamData.killNumText.text = LogicDataCenter.recordTableDataManager.getWarSameCampPersonKillNum(camp).ToString();
            teamData.moneyText.text   = string.Format("${0}", LogicDataCenter.recordTableDataManager.GetTeamTotalMoney(camp).ToString());
            teamData.towerText.text   = LogicDataCenter.recordTableDataManager.GetTeamTotalDestroyTower(camp).ToString();
            Dictionary <ulong, WarRecordTableDataManager.WarPersonInfo> dicPersonInfo = LogicDataCenter.recordTableDataManager.recordInfoArry;

            foreach (PlayerCombatData playerData in listPlayerData)
            {
                playerData.gameObject.SetActive(false);
            }

            int nHalfPlayerNum = LogicDataCenter.recordTableDataManager.GetHalfPlayerCount();

            foreach (KeyValuePair <ulong, WarRecordTableDataManager.WarPersonInfo> kvp in dicPersonInfo)
            {
                WarRecordTableDataManager.WarPersonInfo personInfo = kvp.Value;
                if (personInfo.nCamp == camp)
                {
                    int nSlot = LogicDataCenter.recordTableDataManager.getIndexAcordPDBID(personInfo.uPDBID);
                    int index = nSlot < listPlayerData.Count ? nSlot : nHalfPlayerNum * 2 - nSlot - 1;
                    if (index < listPlayerData.Count)
                    {
                        PlayerCombatData playerData = listPlayerData[index];
                        playerData.playerNameText.text        = personInfo.playerName;
                        playerData.levelText.text             = personInfo.nLevel.ToString();
                        playerData.headPortraitImage.sprite   = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeadPortrait, WndID.WND_ID_WAR_OBSERVER, 1, 3, personInfo.nHeroId);
                        playerData.summonerSkill2Image.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_Skill, WndID.WND_ID_WAR_OBSERVER, 1, personInfo.nSummerIconID);
                        playerData.gameObject.SetActive(true);
                        playerData.nEntityID = personInfo.nID;
                        playerData.nPDBID    = (int)personInfo.uPDBID;

                        if (!dicPlayerData.ContainsKey((int)kvp.Value.nID))
                        {
                            dicPlayerData[(int)kvp.Value.nID] = playerData;
                        }
                    }
                    else
                    {
                        Debug.LogErrorFormat("warhero info slot is error.({0})", index);
                        break;
                    }
                }
            }
        }
Beispiel #5
0
        public void Init(WarObserverWndView masterView)
        {
            m_masterView = masterView;
            teamData.killNumText.text = "0";
            teamData.moneyText.text   = "0";
            teamData.towerText.text   = "0";

            templateItem.gameObject.SetActive(false);
            for (int j = 0; j < LogicDataCenter.recordTableDataManager.GetHalfPlayerCount(); ++j)
            {
                PlayerCombatData item = Instantiate <PlayerCombatData>(templateItem);
                item.gameObject.GetComponent <Button>().onClick.AddListener(() => m_masterView.OnPlayerItemClick(item));
                item.gameObject.SetActive(true);
                item.transform.SetParent(templateItem.transform.parent, false);
                item.Init();
                listPlayerData.Add(item);
            }
        }