Esempio n. 1
0
        public override void Initialize(CompProperties props)
        {
            base.Initialize(props);

            //Give default starting Job.
            DivineJobDef defaultJob = DefDatabase <DivineJobDef> .AllDefs.FirstOrDefault(def => def.defaultJob);

            if (defaultJob != null)
            {
                AddJob(DivineJobUtility.MakeJobInstance(defaultJob));
            }
        }
Esempio n. 2
0
        public void AddJob(DivineJobDef jobDef, bool setAsActive = false)
        {
            JobData job = DivineJobUtility.MakeJobInstance(jobDef);

            AddJob(job);
            if (setAsActive)
            {
                if (job.def.jobType == JobType.Normal)
                {
                    activeJob = job;
                }
                else if (job.def.jobType == JobType.Race)
                {
                    activeRaceJob = job;
                }
            }
        }