Exemple #1
0
    public void Submit()
    {
        TrainingManager _trainingManager = GameObject.Find("TrainingManager").GetComponent <TrainingManager>();
        string          _gameName        = _trainingManager.SubjectIndex.ToString() + _trainingManager.MinigameIndex.ToString();
        string          _result          = charTexts[0].text + charTexts[1].text + charTexts[2].text;

        //_trainingManager.EndTraining();
        //GameManager.Instance.gameObject.GetComponent<LocalRankingManager>().SaveRecord(_gameName, _result, GameManager.Instance.DifficultyLevel);
        GameManager.Instance.gameObject.GetComponent <RankingManager>().SaveRecord(
            _gameName, _result, GameManager.Instance.DifficultyLevel, () =>
        {
            _trainingManager.SetMyRankingText();
            _trainingManager.CloseEndPanel();
            _trainingManager.ShowRankPanel();
        }
            );
    }