Esempio n. 1
0
        public async Task <IdolPickGroup> Show(IdolPickGroup existing)
        {
            PickCompleted = false;
            PickGroup     = existing;
            MaxPick       = existing.Capacity;

            isSlotFilled = new bool[MaxPick];
            for (int i = 0; i < MaxPick; i++)
            {
                if (existing.IdolIndices[i] != -1)
                {
                    isSlotFilled[i] = true;
                }
            }

            MasterPickPanel.SetActive(true);
            for (int i = 0; i < cards.Count; i++)
            {
                cards[i].GetComponentInChildren <IdolPickerCardClicker>().Clean();
                cards[i].SetActive(true);

                var linked = cards[i].GetComponentInChildren <IdolCard>().LinkedIdol;
                for (int j = 0; j < existing.IdolIndices.Length; j++)
                {
                    if (linked.Index == existing.IdolIndices[j])
                    {
                        cards[i].GetComponentInChildren <IdolPickerCardClicker>().SetPicked(j);
                        break;
                    }
                }
            }

            await new WaitUntil(() => PickCompleted);
            return(PickGroup);
        }
Esempio n. 2
0
        public async Task <IdolPickGroup> Show(IdolPickGroup existing, bool isWorkOrLesson = false)
        {
            IsWorkLessonPick = isWorkOrLesson;
            PickCompleted    = false;
            PickGroup        = existing;
            MaxPick          = existing.Capacity;

            isSlotFilled = new bool[MaxPick];
            for (int i = 0; i < MaxPick; i++)
            {
                if (existing.IdolIndices[i] != -1)
                {
                    isSlotFilled[i] = true;
                }
            }

            MasterPickPanel.SetActive(true);
            for (int i = 0; i < cards.Count; i++)
            {
                var cardClicker = cards[i].GetComponentInChildren <IdolPickerCardClicker>();
                cardClicker.Clean();
                cards[i].SetActive(true);

                var  linked = cards[i].GetComponentInChildren <IdolCard>().LinkedIdol;
                bool flag   = false;
                for (int j = 0; j < existing.IdolIndices.Length; j++)
                {
                    if (linked.Index == existing.IdolIndices[j])
                    {
                        cardClicker.SetPicked(j);
                        flag = true;
                        break;
                    }
                }
                if (isWorkOrLesson && flag == false && linked.IsWorkLessonPicked)
                {
                    cardClicker.WorkLessonEffect.SetActive(true);
                    cardClicker.allowPick = false;
                }
            }
            Bar.value = 1;

            await new WaitUntil(() => PickCompleted);
            return(PickGroup);
        }
Esempio n. 3
0
 public WorkData(Dictionary <string, object> csvLine)
 {
     Title        = (string)csvLine["title"];
     Description  = (string)csvLine["description"];
     IdolSlot     = new IdolPickGroup((int)csvLine["idolCount"]);
     CheckAbility = new bool[]
     {
         (int)csvLine["chkVocal"] == 0 ? false : true,
         (int)csvLine["chkDance"] == 0 ? false : true,
         (int)csvLine["chkVisual"] == 0 ? false : true,
         (int)csvLine["chkVariety"] == 0 ? false : true
     };
     RequireAbility = new int[]
     {
         (int)csvLine["reqVocal"], (int)csvLine["reqDance"], (int)csvLine["reqVisual"], (int)csvLine["reqVariety"],
         (int)csvLine["reqMoney"], (int)csvLine["reqHonor"], (int)csvLine["reqFan"]
     };
     RewardCoeff = new int[] { (int)csvLine["rwdMoney"], (int)csvLine["rwdHonor"], (int)csvLine["rwdFan"] };
 }
Esempio n. 4
0
        public async Task <IdolPickGroup> Show(int count)
        {
            PickCompleted = false;
            PickGroup     = new IdolPickGroup(count);
            MaxPick       = count;

            isSlotFilled = new bool[count];
            for (int i = 0; i < MaxPick; i++)
            {
                isSlotFilled[i] = false;
            }

            // DO UI THING
            MasterPickPanel.SetActive(true);
            for (int i = 0; i < cards.Count; i++)
            {
                cards[i].GetComponentInChildren <IdolPickerCardClicker>().Clean();
                cards[i].SetActive(true);
            }

            await new WaitUntil(() => PickCompleted);
            return(PickGroup);
        }
Esempio n. 5
0
        public async void SetIdol()
        {
            Idols = await IdolPicker.Instance.Show(Idols, true);

            int spendMoney = 0;

            for (int i = 0; i < Idols.Capacity; i++)
            {
                if (Idols.IdolIndices[i] != -1)
                {
                    var idol = IngameManager.Instance.Data.Idols[Idols.IdolIndices[i]];
                    switch (AbilityIndex)
                    {
                    case 0:
                        spendMoney += LessonManager.SpendMoneyTable[idol.Vocal];
                        break;

                    case 1:
                        spendMoney += LessonManager.SpendMoneyTable[idol.Dance];
                        break;

                    case 2:
                        spendMoney += LessonManager.SpendMoneyTable[idol.Visual];
                        break;

                    case 3:
                        spendMoney += LessonManager.SpendMoneyTable[idol.Variety];
                        break;

                    default:
                        break;
                    }
                }
            }
            totalSpendMoney = spendMoney;
        }
Esempio n. 6
0
 public void ResetSlot()
 {
     Idols           = new IdolPickGroup(4);
     totalSpendMoney = 0;
 }
Esempio n. 7
0
 public CDData()
 {
     CDCount = 1;
     Songs   = new List <int>();
     Idols   = new IdolPickGroup(12);
 }