implement simple learning process

This commit is contained in:
Vova
2023-12-19 19:22:26 +02:00
parent 22149e24c8
commit 0f60b41d58
11 changed files with 84 additions and 31 deletions
+13
View File
@@ -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;
}
}
}