示例#1
0
    void ReadFile()
    {
        m_currentHiScores.Clear();

        //Read the text from directly from the test.txt file
        StreamReader reader = new StreamReader(m_path);

        if (reader == null)
        {
            return;
        }

        while (!reader.EndOfStream)
        {
            HI_SCORE hiScore = new HI_SCORE();

            hiScore.Load(reader);

            m_currentHiScores[hiScore.m_score] = hiScore;
        }

        reader.Close();

        PopulatePanel();
    }
示例#2
0
    // Update is called once per frame
    public void InsertElement(PLAYER_VITALS vitals)
    {
        HI_SCORE aScore = new HI_SCORE();

        aScore.m_name  = vitals.m_name;
        aScore.m_score = vitals.m_score;

        m_currentHiScores[aScore.m_score] = aScore;
    }