void accessLog() { string timeLog = System.DateTime.Now.ToString(); if (accessDirection != "") { if (correctDirection == accessDirection) { //Debug.Log ("correct access" + accessDirection); if (accessDirection == "Forward") { if (logCount < 1) { infoBrg.setAccessLog("Correct access: move" + accessDirection + ". " + timeLog); infoBrg.setCorrectNum(2 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); infoBrg.setAccessNum(2 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); } } else { infoBrg.setAccessLog("Correct access: turn" + accessDirection + ". " + timeLog); if (accessDirection == "Left") { infoBrg.setCorrectNum(3 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); infoBrg.setAccessNum(4 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); } if (accessDirection == "Right") { infoBrg.setAccessNum(0 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); infoBrg.setCorrectNum(1 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); } } //logCount ++; } else { //Debug.Log ("wrong access" + accessDirection); if (accessDirection == "Forward") { if (logCount < 1) { infoBrg.setAccessLog("Wrong access: move" + accessDirection + ".(Wrong access!!!) correct access is move" + " " + correctDirection + " " + timeLog); infoBrg.setAccessNum(2 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); if (correctDirection == "Forward") { infoBrg.setCorrectNum(2 + " "); // + "access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); } else if (correctDirection == "Left") { infoBrg.setCorrectNum(3 + " "); // + " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); } else if (correctDirection == "Right") { infoBrg.setCorrectNum(1 + " "); // + " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); } } } else { infoBrg.setAccessLog("Wrong access: turn" + accessDirection + ".(Wrong access!!!) correct access is move" + " " + correctDirection + " " + timeLog); if (correctDirection == "Forward") { infoBrg.setCorrectNum(2 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); } else if (correctDirection == "Left") { infoBrg.setCorrectNum(3 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); } else if (correctDirection == "Right") { infoBrg.setCorrectNum(1 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); } if (accessDirection == "Left") { infoBrg.setAccessNum(4 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); } if (accessDirection == "Right") { infoBrg.setAccessNum(0 + " "); //+ " access: " + accessDirection + " correct: " + correctDirection + "; " + timeLog); } } } /*if (correctDirection == "Forward") { * if (logCount < 1) * infoBrg.setCorrectNum (2 + " "); * }else if (correctDirection == "Left") * infoBrg.setCorrectNum (1 + " "); * else if (correctDirection == "Right") * infoBrg.setCorrectNum (3 + " "); * if (accessDirection == "Forward") { * if (logCount < 1) * infoBrg.setAccessNum (2 + " "); * }else if (accessDirection == "Left") * infoBrg.setAccessNum (1 + " "); * else if (accessDirection == "Right") * infoBrg.setAccessNum (3 + " "); */ logCount++; if (logCount > 25) { logCount %= logCount; } } }