//   UpdatePoints(points, headShotCount, streakCounter, maxHeadshotsinarow, killCount, missedshots, shotCount, deaths, pointslost,numberofReloads,numberofReloads);
    void UpdatePoints(int ArgScore, int ArgHeadshots, int ArgStreakcount, int ArgMaxstreak, int ArgKills, int ArgMiss, int ArgTotalshots, int ArgDeaths, int ArgPointslost, int ArgReloads, int ArgWavesPlayed)
    {
        CurPlayerPoints = new Data_PlayerPoints();

        CurPlayerPoints.score           = ArgScore;
        CurPlayerPoints.headshots       = ArgHeadshots;
        CurPlayerPoints.streakcount     = ArgStreakcount;
        CurPlayerPoints.maxstreak       = ArgMaxstreak;
        CurPlayerPoints.kills           = ArgKills;
        CurPlayerPoints.miss            = ArgMiss;
        CurPlayerPoints.totalshots      = ArgTotalshots;
        CurPlayerPoints.deaths          = ArgDeaths;
        CurPlayerPoints.pointslost      = ArgPointslost;
        CurPlayerPoints.numberofReloads = ArgReloads;
        CurPlayerPoints.wavessurvived   = ArgWavesPlayed;

        Debug.Log("the scores are " + CurPlayerPoints.ToString());
    }
Example #2
0
    void Escape()
    {
        Debug.Log("input string " + inputstring);
        string[] strarra = inputstring.Split(',');
        if (cur_data_PlayerInfo == null)
        {
            cur_data_PlayerInfo = new Data_PlayerInfo();
        }

        if (strarra.Length == 4)
        {
            cur_data_PlayerInfo.PlayerFirstName = strarra[0];
            cur_data_PlayerInfo.PlayerLastName  = strarra[1];
            cur_data_PlayerInfo.PlayerUserName  = strarra[2];
            cur_data_PlayerInfo.PlayerEmail     = strarra[3];

            Debug.Log("you  entered " + cur_data_PlayerInfo.ToString());

            if (PersistantScoreGrabber.Instance == null)
            {
                CurPlayerPoints = new Data_PlayerPoints(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
            }
            else
            {
                CurPlayerPoints = PersistantScoreGrabber.Instance.Get_Data_Player();
            }

            Debug.Log("the scores are " + CurPlayerPoints.ToString());


            Data_PlayerSession thisSession = new Data_PlayerSession(System.DateTime.Now, cur_data_PlayerInfo, CurPlayerPoints);

            _sessmngr.SaveSession_to_ALLSessions_AndSaveTOFile(thisSession);
            textwasentered = true;


            StartCoroutine(AUTOGOTOGAME());
        }
        else
        {
            ResetInputFieldAndTxt();
            TextBoxField.ActivateInputField();
        }
    }