Exemple #1
0
    void RecordData()
    {
        foreach (HollowBlock block in hollowBlocks)
        {
            if (block.IsSolved())
            {
                currentKey = new Tuple <string, int> ("Hollow Block", PlayerDatav2.hollowBlockIndex);
                DataManagerv2.CreateEmptyEntry(currentKey);
                HollowBlockEntry entry = new HollowBlockEntry();
                entry.name  = "Hollow Block " + PlayerDatav2.hollowBlockIndex;
                entry.topic = sceneTag.GetSceneTopic();
                foreach (SkyFragmentPiece piece in block.GetSkyPieceContainer().GetSkyPieces())
                {
                    AttemptedAnswer attempt = new AttemptedAnswer();
                    attempt.SetNumerator(piece.GetNumerator());
                    attempt.SetDenominator(piece.GetDenominator());
                    entry.attemptedAnswers.Add(attempt);
                }
                DataManagerv2.UpdateHollowBlockEntry(DataManagerv2.GetHollowBlockLastKey(), entry);
                PlayerDatav2.IncrementHollowBlockIndex();
            }
//			entry.correctAttempts = new List<int> ();
        }
        DataManagerv2.PrintHollowBlockDictionary();
    }
    void Awake()
    {
        sharedInstance = this;

        hollowBlockTally = new Dictionary <Tuple <string, int>, HollowBlockEntry> ();
        hollowBlockIndex = 1;
        General.DontDestroyChildOnLoad(this.gameObject);
    }
 void OnDestroy()
 {
     sharedInstance = null;
 }