コード例 #1
0
ファイル: Battle_Sent.cs プロジェクト: team-imasara/V2
        public void set_data(User_Normal_BattleTaskInfo ubti)
        {
            Random random = new Random();


            switch (ubti.teamId_used)
            {
            case 0:
            {
                teaminfo        = ubti.teaminfo0;
                ubti.TeamEffect = ubti.TeamEffect0;
                break;
            }

            case 1:
            {
                teaminfo        = ubti.teaminfo1;
                ubti.TeamEffect = ubti.TeamEffect1;
                break;
            }

            default:
                break;
            }


            foreach (var item in ubti.List_lifeReduce)
            {
                life_reduce += item;
            }

            switch (ubti.TaskMap)
            {
            case 0:    //5-2N
            {
                int    r1        = random.Next(50, 60);
                record tempRecod = new record(r1, ubti.List_withdrawGUN_ID[0], 1, 0, false);
                this.user_rec.listRecord.Add(tempRecod);



                break;
            }

            case 1:    //7-6
            {
                int    r1         = random.Next(150, 180);
                record tempRecod1 = new record(r1, ubti.List_withdrawGUN_ID[0], 1, 0, false);
                record tempRecod2 = new record(r1 + random.Next(20, 50), ubti.List_withdrawGUN_ID[1], 1, 0, false);
                this.user_rec.listRecord.Add(tempRecod1);
                this.user_rec.listRecord.Add(tempRecod2);
                break;
            }

            default:
                break;
            }
            this.skill_cd = ubti.TeamEffect;
        }
コード例 #2
0
ファイル: BattleLoop.cs プロジェクト: team-imasara/V2
        public void Set_Withdraw_INFO(User_Normal_BattleTaskInfo ubti, List <int> withdrawinfo)
        {
            ubti.List_withdrawGUN_ID.Clear();
            ubti.List_withdrawPOS.Clear();
            foreach (var item in withdrawinfo)
            {
                ubti.List_withdrawPOS.Add(item);
            }

            for (int i = 1; i <= UserDataSummery.team_info[ubti.TaskMianTeam_ID].Count; i++)
            {
                foreach (var item in withdrawinfo)
                {
                    if (UserDataSummery.team_info[ubti.TaskMianTeam_ID][i].position == item)
                    {
                        ubti.List_withdrawGUN_ID.Add(UserDataSummery.team_info[ubti.TaskMianTeam_ID][i].id);
                    }
                }
            }
        }