Beispiel #1
0
    private void GetLivesFromStorage()
    {
        string livesTempText = storageEngine.LoadLifeCount();

        if (livesTempText != "")
        {
            string[] livesArray = livesTempText.Split(';');

            //Debug.Log("lives array length: " + livesArray.Length);

            try
            {
                livesLeft = Int32.Parse(livesArray[0]);

                lostLifeTimeStamp = DateTime.Parse(livesArray[1]);

                isLimitless = Boolean.Parse(livesArray[2]);

                limitEndDate = DateTime.Parse(livesArray[3]);

                //Debug.Log("Load from storage : Lives left: " + livesLeft.ToString() + "time left: " + lostLifeTimeStamp.ToString());
            }
            catch (Exception ex)
            {
                Debug.LogError(ex.Message);
            }
        }
    }