Example #1
0
    public override void AcademyStep()
    {
        base.AcademyStep();
        float minutes = (int)(Time.time / 60.0f);
        float seconds = (int)(Time.time % 60.0f);

        StepCount++;

        GoalCount  = 0;
        DeathCount = 0;
        Reward     = 0;
        GameObject[] agent = GameObject.FindGameObjectsWithTag("Agent");
        foreach (GameObject a in agent)
        {
            CourseAgent c = a.GetComponent <CourseAgent>();
            GoalCount  += c.GoalCount;
            DeathCount += c.DeathCount;
            Reward     += c.GetRewardForUi();
        }
        GoalText.text   = "Goals: " + GoalCount;
        DeathText.text  = "Deaths: " + DeathCount;
        RewardText.text = "Reward: " + Reward / agent.Length;
        TimeText.text   = minutes.ToString("00") + ":" + seconds.ToString("00");
    }
 public CourseBusiness(IMapper mapper)
 {
     _mapper      = mapper;
     _courseAgent = new CourseAgent();
 }
 public StudentBusiness(IMapper mapper)
 {
     _mapper       = mapper;
     _studentAgent = new StudentAgent();
     _courseAgent  = new CourseAgent();
 }