Class StudentJobType
A JobType for school students
public class StudentJobType : JobType, IGenericDataHolder, IEmotionSource
- Inheritance
-
GenericDataHolderStudentJobType
- Implements
-
IGenericDataHolder
- Inherited Members
-
GenericDataHolder.GetDataKeys()
- Extension Methods
Constructors
StudentJobType(string, TextureRegion, float, (int Start, int End), params DayOfWeek[])
Creates a new job type with the given settings
public StudentJobType(string name, TextureRegion icon, float hourlyPay, (int Start, int End) workHours, params DayOfWeek[] offWorkDays)
Parameters
name
stringThe name of the job
icon
TextureRegionThis job type's icon.
hourlyPay
floatThe hourly wage that this job yields
workHours
(int Start, int End)A range of hours to work each day
offWorkDays
DayOfWeek[]The days of the week that are off work
Fields
Schedule
The schedule of a PersonLike that has a StudentJobType-based job type. The schedule contains information about what skills should be learned on what days, and is used in UpdateWorking(Job, WorkAction, TimeSpan, float) to award those skills. To add new skills to a given day, simply add to this dictionary's List<T> entries.
public static readonly Dictionary<DayOfWeek, List<SkillType>> Schedule
Field Value
Methods
OnLevelChanged(Job, int)
A method that is called when a Person is promoted or demoted for this job. By default, some emotion modifiers are applied.
public override void OnLevelChanged(Job job, int levelDifference)
Parameters
job
JobThe job instance
levelDifference
intThe level difference that was applied. If the person was demoted, this value is -1, else it is 1.
OnWorkFinished(Job, WorkAction)
A method that is called when a Person finishes a WorkAction for this job. By default, some emotion modifiers are randomly applied.
public override void OnWorkFinished(Job job, WorkAction action)
Parameters
job
JobThe job instance
action
WorkActionThe work action that was completed
UpdateWorking(Job, WorkAction, TimeSpan, float)
Updates this job type's Job instance. By default, this method causes students to gain skills in StudentJobType. This is called in UpdateWorking(WorkAction, TimeSpan, float).
public override void UpdateWorking(Job job, WorkAction action, TimeSpan passedInGame, float speedMultiplier)
Parameters
job
JobThe job instance.
action
WorkActionThe action that is currently being executed.
passedInGame
TimeSpanThe amount of time that has passed in game since the last update.
speedMultiplier
floatThe game's current speed multiplier.