// Invoked when the value of the text field changes. public void ValueChangeCheck() { string[] strarra = StrEntered.Split(','); if (strarra.Length == 4) { if (cur_data_PlayerInfo == null) { cur_data_PlayerInfo = new Data_PlayerInfo(); } 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()); CurPlayerPoints = PersistantScoreGrabber.Instance.Get_Data_Player(); Data_PlayerSession thisSession = new Data_PlayerSession(System.DateTime.Now, cur_data_PlayerInfo, CurPlayerPoints); _sessmngr.SaveSession_to_ALLSessions_AndSaveTOFile(thisSession); textwasentered = true; StartCoroutine(AUTOGOTOGAME()); } else { Debug.Log("inbvalid input , must re make inputfield active and start all over after deleting th einput text field"); ResetInputFieldAndTxt(); TextBoxField.ActivateInputField(); } }
void Init2() { TextBoxField.ActivateInputField(); TextBoxField.onValueChanged.AddListener(delegate { CatchSend(); }); _sessmngr = GetComponent <SessionDataManager>(); 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(); } txt.text = ""; txt.text = "Player Final Score = " + CurPlayerPoints.score + "\n" + " Accuracy = " + CalcAccuracy(CurPlayerPoints.totalshots, CurPlayerPoints.miss) + "\n" + "Player wavessurvived = " + CurPlayerPoints.wavessurvived + "\n" + "Player points Lost = " + CurPlayerPoints.pointslost + "\n" + "Player deaths = " + CurPlayerPoints.deaths + "\n" + "\n" + "Player headshots = " + CurPlayerPoints.headshots + "\n" + "Player streakcount = " + CurPlayerPoints.streakcount + "\n" + "Player maxstreak = " + CurPlayerPoints.maxstreak + "\n" + "Player zombies killed = " + CurPlayerPoints.kills + "\n" + "Player Shots missed = " + CurPlayerPoints.miss + "\n" + "Player totalshots = " + CurPlayerPoints.totalshots + "\n" + "Player numberofReloads = " + CurPlayerPoints.numberofReloads + "\n" + "Player wavessurvived = " + CurPlayerPoints.wavessurvived + "\n"; }
void Start() { _sessmngr = GetComponent <SessionDataManager>(); aliceinfo = new Data_PlayerInfo("alice", "alexander", "aa", "*****@*****.**"); bobinfo = new Data_PlayerInfo("bob", "bristol", "bb", "*****@*****.**"); cindyinfo = new Data_PlayerInfo("cindy", "lopper", "cc", "*****@*****.**"); alicePoints = new Data_PlayerPoints(111, 142, 1143, 111, 187171, 67, 8, 2, 3, 45, 3); bobPoints = new Data_PlayerPoints(22652, 2223, 22332, 2, 234, 2367, 22, 2, 3, 45, 3); cinsyPoints = new Data_PlayerPoints(3563, 38, 3, 309, 36773, 333, 3, 2, 3, 45, 3); alicesession = new Data_PlayerSession(DateTime.Now.AddMinutes(1), aliceinfo, alicePoints); bobsession = new Data_PlayerSession(DateTime.Now.AddMinutes(20), bobinfo, bobPoints); cindysession = new Data_PlayerSession(DateTime.Now.AddMinutes(120), cindyinfo, cinsyPoints); }
// 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()); }
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(); } }
public Data_PlayerSession() { SerrionTime = SessionTimeStampFormatter(DateTime.Now); PInfo = new Data_PlayerInfo(); PPoints = new Data_PlayerPoints(); }
public Data_PlayerSession(DateTime dt, Data_PlayerInfo argPInfo, Data_PlayerPoints argPPoints) { SerrionTime = SessionTimeStampFormatter(dt); PInfo = argPInfo; PPoints = argPPoints; }