void Start() { playerInfoFileHandler = new FileHandler <int>(pathToPlayerInfoFile); templatesFileHandler = new FileHandler <List <GestureTemplate> >(pathToTemplatesFile); Trail.SetActive(false); PlayerInfo.GetInfo(playerInfoFileHandler); allTemplates = templatesFileHandler.Load(); foreach (GestureTemplate g in allTemplates) { g.AfterSerializing(); } points = new List <Vector2>(); gestureRecognizer = new RecognizerWithFormCoeficient(); scoreUI.text = "0"; timeUI.text = "30:00"; Debug.Log("Templates loaded."); template = allTemplates[Randomizer()]; Debug.Log(template.ToString()); PlayerInfo.CurrentScore = 0; gestureRecognizer.Template = template.Points; TemplateName.text = template.Name; // DrawTemplate(template.Points); }
private void LevelPassed() { template = allTemplates[Randomizer()]; Debug.Log("Template: " + template.Name); // DrawTemplate(template.Points); PlayerInfo.CurrentScore++; scoreUI.text = PlayerInfo.CurrentScore.ToString(); timeForLevel *= 0.95f; timeLeft = (float)Math.Round(timeForLevel); gestureRecognizer.Template = template.Points; TemplateName.text = template.Name; }