implement simple learning process
This commit is contained in:
@@ -16,6 +16,8 @@ public class Player : BaseCharacter
|
||||
public Dictionary<StatsId, object> Stats;
|
||||
public JobPositions JobPosition { get; set; }
|
||||
|
||||
private List<EducationInfoSO> _completedCourses=new();
|
||||
public EducationInfoSO ActiveCourse { get; set; }
|
||||
public EducationSkill Education { get; set; }
|
||||
|
||||
private ContainerItem _containerItem;
|
||||
@@ -148,4 +150,15 @@ public class Player : BaseCharacter
|
||||
{
|
||||
return _locationName;
|
||||
}
|
||||
|
||||
internal void Learn(TimeSpan time)
|
||||
{
|
||||
ActiveCourse.PlayerProgress+= time.Hours;
|
||||
if(ActiveCourse.PlayerProgress>=ActiveCourse.Duration)
|
||||
{
|
||||
Education++;
|
||||
print($"Congratulation player finish curse {ActiveCourse.Description} and his education now {Education.ToString()}");
|
||||
ActiveCourse =null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user