Пример #1
0
        void ScheduleChange(int key, Schedule changeSchedule)
        {
            string temp_DateTime = scheduleModel.DicSchedule[key].dateTime;
            int    tempIndex     = scheduleModel.DicSchedule[key].index;

            scheduleModel.DicSchedule.Remove(key);

            AloneGameSchedule tempAlongGame = new AloneGameSchedule();

            tempAlongGame.dateTime = temp_DateTime;
            tempAlongGame.index    = tempIndex;
            tempAlongGame.schedule = changeSchedule;
            scheduleModel.DicSchedule.Add(key, tempAlongGame);

            if (playerStatusModel.ManageMentCount == settingModel.ManageMentTotalCount)
            {
                playerStatusModel.ManageMentUseTime = DateTime.Now.ToString();
            }

            playerStatusModel.ManageMentCount -= 1;

            Message.Send <AloneGameScheduleInfoMsg>(new AloneGameScheduleInfoMsg(scheduleModel.DicSchedule));
            Message.Send <AloneGameTopBarSettingRequestMsg>(new AloneGameTopBarSettingRequestMsg());
            stage_Controller.SetStage(scheduleModel.DicSchedule[0].schedule, playerInventoryModel.NowCharacter, optionModel.MobileOption.gameVolume);
            CharacterAnimaionPlay();
            ManageMentRecoveryCheck();
        }
Пример #2
0
        void ScheduleChange(int key, Schedule changeSchedule)
        {
            string temp_DateTime = scheduleModel.DicSchedule[key].dateTime;
            int    tempIndex     = scheduleModel.DicSchedule[key].index;

            scheduleModel.DicSchedule.Remove(key);

            AloneGameSchedule tempAlongGame = new AloneGameSchedule();

            tempAlongGame.dateTime = temp_DateTime;
            tempAlongGame.index    = tempIndex;
            tempAlongGame.schedule = changeSchedule;
            scheduleModel.DicSchedule.Add(key, tempAlongGame);

            if (playerStatusModel.ManageMentCount == settingModel.ManageMentTotalCount)
            {
                playerStatusModel.ManageMentUseTime = DateTime.Now.ToString();
            }

            playerStatusModel.ManageMentCount -= 1;

            Message.Send <AloneGameScheduleInfoMsg>(new AloneGameScheduleInfoMsg(scheduleModel.DicSchedule));
            Message.Send <AloneGameTopBarSettingRequestMsg>(new AloneGameTopBarSettingRequestMsg());
            stage_Controller.SetStage(scheduleModel.DicSchedule[0].schedule);
            //todo.. 매니지 먼트 소모후
            ManageMentRecoveryCheck();
        }
Пример #3
0
        AloneGameSchedule CreateSchedule(int index, Schedule schedule, string dateTime)
        {
            AloneGameSchedule alonGameShedule = new AloneGameSchedule();

            alonGameShedule.index    = index;
            alonGameShedule.schedule = schedule;
            alonGameShedule.dateTime = dateTime;
            return(alonGameShedule);
        }
Пример #4
0
        void ScheduleComplete(int cnt)
        {
            int upStatus;

            System.DateTime nowTime = System.Convert.ToDateTime(System.DateTime.Now);

            for (int i = 0; i < cnt; i++)
            {
                upStatus = UnityEngine.Random.Range(1, 10);
                if (scheduleModel.DicSchedule[0].schedule == Schedule.Vocal)
                {
                    playerStatusModel.VocalGage += upStatus;
                    if (playerStatusModel.VocalGage > 100)
                    {
                        playerStatusModel.Vocal     += playerStatusModel.VocalGage / 100;
                        playerStatusModel.VocalGage %= 100;
                    }
                }
                else if (scheduleModel.DicSchedule[0].schedule == Schedule.Dance)
                {
                    playerStatusModel.DanceGage += upStatus;
                    if (playerStatusModel.DanceGage > 100)
                    {
                        playerStatusModel.Dance     += playerStatusModel.DanceGage / 100;
                        playerStatusModel.DanceGage %= 100;
                    }
                }
                else if (scheduleModel.DicSchedule[0].schedule == Schedule.Entertainment)
                {
                    playerStatusModel.EnterTainmentGage += upStatus;
                    if (playerStatusModel.EnterTainmentGage > 100)
                    {
                        playerStatusModel.Entertainment     += playerStatusModel.EnterTainmentGage / 100;
                        playerStatusModel.EnterTainmentGage %= 100;
                    }
                }
                else if (scheduleModel.DicSchedule[0].schedule == Schedule.Intelligence)
                {
                    playerStatusModel.IntelligenceGage += upStatus;
                    if (playerStatusModel.IntelligenceGage > 100)
                    {
                        playerStatusModel.Intelligence     += playerStatusModel.IntelligenceGage / 100;
                        playerStatusModel.IntelligenceGage %= 100;
                    }
                }
                playerStatusModel.Potential += upStatus;

                scheduleModel.DicSchedule.Remove(0);

                for (int j = 0; j < scheduleModel.DicSchedule.Count; j++)
                {
                    string   temp_DateTime = scheduleModel.DicSchedule[j + 1].dateTime;
                    int      tempIndex     = scheduleModel.DicSchedule[j + 1].index;
                    Schedule tempSchedule  = scheduleModel.DicSchedule[j + 1].schedule;
                    scheduleModel.DicSchedule.Remove(j + 1);

                    AloneGameSchedule tempAlongGame = new AloneGameSchedule();
                    tempAlongGame.dateTime = temp_DateTime;
                    tempAlongGame.index    = tempIndex;
                    tempAlongGame.schedule = tempSchedule;
                    scheduleModel.DicSchedule.Add(j, tempAlongGame);
                }

                // 끝에 신규 스케줄 생성
                System.DateTime startTime = Convert.ToDateTime(scheduleModel.DicSchedule[scheduleModel.DicSchedule.Count - 1].dateTime).AddSeconds(settingModel.CompleteSpanTime);
                int             index     = scheduleModel.DicSchedule[scheduleModel.DicSchedule.Count - 1].index + 1;

                Schedule tempNewSchedule;
                if (index % 12 == 1 || index % 12 == 5)
                {
                    tempNewSchedule = Schedule.Meal;
                }
                else if (index % 12 == 9 || index % 12 == 10)
                {
                    tempNewSchedule = Schedule.Rest;
                }
                else
                {
                    tempNewSchedule = (Schedule)UnityEngine.Random.Range(0, 4);
                }

                AloneGameSchedule tempNewAlonGameSchedule = new AloneGameSchedule();
                tempNewAlonGameSchedule.dateTime = startTime.ToString();
                tempNewAlonGameSchedule.index    = index;
                tempNewAlonGameSchedule.schedule = tempNewSchedule;
                scheduleModel.DicSchedule.Add(scheduleModel.DicSchedule.Count, tempNewAlonGameSchedule);
            }

            stage_Controller.SetStage(scheduleModel.DicSchedule[0].schedule, playerInventoryModel.NowCharacter, optionModel.MobileOption.gameVolume);
            CharacterAnimaionPlay();

            Message.Send <AloneGameMainScheduleSettingMsg>(new AloneGameMainScheduleSettingMsg(scheduleModel.DicSchedule[0].schedule,
                                                                                               scheduleModel.DicSchedule[1].schedule,
                                                                                               Convert.ToDateTime(scheduleModel.DicSchedule[0].dateTime),
                                                                                               settingModel.CompleteSpanTime));

            Message.Send <AloneGameScheduleInfoMsg>(new AloneGameScheduleInfoMsg(scheduleModel.DicSchedule));
        }