コード例 #1
0
        public void SaveJoinBattleList(int listId, int position, ArmyCardItem item)
        {
            List <SoldierInfo> soldierList = DataManager.GetInstance().GetPlayerUnits().soldiers;

            int soldierId = soldierList.Find(p => p.metaId == item.id).metaId;

            SendJoinBattleListC2S(listId, position, soldierId);
        }
コード例 #2
0
        public void OpenUnitUI()
        {
            armyManTran.gameObject.SetActive(true);
            combatDeckTran.gameObject.SetActive(true);
            instituteManTran.gameObject.SetActive(false);
            skillDeckTran.gameObject.SetActive(false);

            currentClickArmyItem  = null;
            currentClickSkillItem = null;

            RefreshArmyItem();
        }
コード例 #3
0
        private void OpenInstituteUI()
        {
            armyManTran.gameObject.SetActive(false);
            combatDeckTran.gameObject.SetActive(false);
            instituteManTran.gameObject.SetActive(true);
            skillDeckTran.gameObject.SetActive(true);

            currentClickArmyItem  = null;
            currentClickSkillItem = null;
            SetClickSkillProp();

            SetSkillDeck();

            RefreshInstituteItem();
        }
コード例 #4
0
        private void OnArmyItemClickCallBack(ArmyCardItem item)
        {
            currentClickArmyItem = null;
            foreach (ArmyCardItem ite in armyCard_Items)
            {
                ite.glowImage.gameObject.SetActive(false);
            }

            if (item.armyNumber <= 0)
            {
                return;
            }

            item.glowImage.gameObject.SetActive(true);

            currentClickArmyItem = item;
        }
コード例 #5
0
        private void OnCombatDeckItemClickCallBack(CombatDeckCardItem item)
        {
            if (currentClickArmyItem == null)
            {
                return;
            }

            foreach (ArmyCardItem ite in armyCard_Items)
            {
                ite.glowImage.gameObject.SetActive(false);
            }

            if (currentClickArmyItem.id != item.id)
            {
                controller.SaveJoinBattleList(currentListId, item.index, currentClickArmyItem);
            }

            currentClickArmyItem = null;
        }