Ejemplo n.º 1
0
        public MissionTask(MissionTaskData i_data, MissionProposal i_missionProposal)
        {
            mModel = new ViewModel();
            mData  = i_data;

            SetUpModel();
            AddUnitsEligibleForTask(i_missionProposal);
        }
Ejemplo n.º 2
0
        public TaskUnitSelection(IUnit i_unit, MissionTaskData i_taskData, IMissionProposal i_proposal)
        {
            mMissionProposal  = i_proposal;
            mUnit             = i_unit;
            mTaskIndex        = i_taskData.Index;
            mStat             = i_taskData.StatRequirement;
            mPowerRequirement = i_taskData.PowerRequirement;
            mModel            = new ViewModel();

            SetUpModel();

            mTaskProposal = new MissionTaskProposal(mTaskIndex, mUnit.GetID(), NumUnitsRequired);
        }
Ejemplo n.º 3
0
        private void CreateTestMission_Offline()
        {
            MissionData testMissionData = new MissionData();

            testMissionData.DescriptionKey = "TEST_MISSION_DESC";
            testMissionData.Index          = 0;

            MissionTaskData taskA = new MissionTaskData();

            taskA.DescriptionKey   = "Task 1";
            taskA.PowerRequirement = 5000;
            taskA.StatRequirement  = "TEST_STAT_1";

            MissionTaskData taskB = new MissionTaskData();

            taskB.DescriptionKey   = "Task 2";
            taskB.PowerRequirement = 2000;
            taskB.StatRequirement  = "TEST_STAT_2";

            MissionTaskData taskC = new MissionTaskData();

            taskC.DescriptionKey   = "Task 3";
            taskC.PowerRequirement = 2000;
            taskC.StatRequirement  = "TEST_STAT_2";

            //testMissionData.Tasks = new List<MissionTaskData>() { taskA };
            testMissionData.Tasks = new List <MissionTaskData>()
            {
                taskA, taskB, taskC
            };

            mTestMission = new Mission(testMissionData);

            GameObject  missionUI = gameObject.InstantiateUI(MissionViewPrefab, MainCanvas);
            MissionView view      = missionUI.GetComponent <MissionView>();

            view.Init(mTestMission);

            //List<MissionData> listMissions = new List<MissionData>();
            //listMissions.Add( testMissionData );
            //string missionAsJSON = JsonConvert.SerializeObject( listMissions );
            //UnityEngine.Debug.LogError( missionAsJSON );
        }
Ejemplo n.º 4
0
 private void AddMissionTask(MissionTaskData i_data)
 {
     mTasks.Add(new MissionTask(i_data, MissionProposal));
 }