Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
[log] improved loggin of InfoEvent.GameStart
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanoCecere committed Mar 10, 2017
1 parent bea5cd6 commit db04639
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Assets/_app/_scripts/MinigamesAPI/MiniGameLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,15 @@ public MiniGameLauncher(TeacherAI _teacher)
public void LaunchGame(MiniGameCode _gameCode, MinigameLaunchConfiguration _launchConfiguration = null, bool forceNewPlaySession = false)
{
ConfigAI.StartTeacherReport();
if (_launchConfiguration == null)
{
if (_launchConfiguration == null) {
float difficulty = teacher.GetCurrentDifficulty(_gameCode);
int numberOfRounds = teacher.GetCurrentNumberOfRounds(_gameCode);
_launchConfiguration = new MinigameLaunchConfiguration(difficulty, numberOfRounds);
}

Database.MiniGameData miniGameData = AppManager.I.DB.GetMiniGameDataByCode(_gameCode);

if (forceNewPlaySession)
{

if (forceNewPlaySession) {
AppManager.I.NavigationManager.InitialiseNewPlaySession(miniGameData);
}

Expand All @@ -65,7 +63,7 @@ public void LaunchGame(MiniGameCode _gameCode, MinigameLaunchConfiguration _laun

// Comunicate to LogManager the start of a new single minigame play session.
if (AppConstants.DebugLogInserts) Debug.Log("InitGameplayLogSession " + _gameCode.ToString());
LogManager.I.LogInfo(InfoEvent.GameStart, _gameCode.ToString());
LogManager.I.LogInfo(InfoEvent.GameStart, "{\"minigame\":\"" + _gameCode.ToString() + "\"}");
LogManager.I.StartMiniGame();

// Print the teacher's report now
Expand Down

0 comments on commit db04639

Please sign in to comment.