<commit_before>﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography;
using System;
using SimpleJSON;
using Score;

public class GameOverScript : MonoBehaviour 
{    
    public AudioClip gameOverSound;
    int score = 0;
    int rubies = 0;
    int moneyRubies = 0;
    string textTime = "00:00:000";
    string txtPlayerName = "";
    string refererScreen = "";
    float screenUpTime = 0f;

    string listMode = "24h";
    bool isShareOpen = false;

    //bool newInterface = true;
    public Texture2D[] characterButtons;
    public Texture2D characterBGbutton;
    public Texture2D[] numbersTexture;
    public Texture2D colonTexture;
    public Texture2D timerTexture;
    public Texture2D rubyTexture0;
    public Texture2D rubyTexture1;
    public Texture2D restartTexture;
    public Texture2D quitTexture;

    public Texture2D sendTexture;
    public Texture2D refreshTexture;
    public Texture2D loadingTexture;
    public Texture2D doneTexture;

    public Texture2D time24hTexture;
    public Texture2D timeAllTexture;
    public Texture2D selectedTexture;
    public Texture2D backTexture;

    public Texture2D shareTexture;
    public Texture2D facebookTexture;
    public Texture2D twitterTexture;
    public Texture2D googleplusTexture;

    public Texture2D scoreboardImageTexture;

    public Texture2D iosIconTexture;
    public Texture2D androidIconTexture;
    public Texture2D wpIconTexture;
    public Texture2D unityIconTexture;

    public Texture2D scoreFrameTexture, timerFrameTexture, rubyFrameTexture, scoreBGTexture;    
	
    void Start () 
    {        
        score = PlayerPrefs.GetInt ("Score");
        PlayerPrefs.DeleteKey("Score");
           
        rubies = PlayerPrefs.GetInt("Rubies", 0);
        PlayerPrefs.DeleteKey("Rubies");

        moneyRubies = PlayerPrefs.GetInt("MoneyRubies", 0);

        textTime = PlayerPrefs.GetString("Timer", "00:00:000");
        PlayerPrefs.DeleteKey("Timer");

        txtPlayerName = PlayerPrefs.GetString("PlayerName", "Anonymous");

        refererScreen = PlayerPrefs.GetString("RefererScreen", "GameScreen");
        PlayerPrefs.DeleteKey("RefererScreen");

        if (PlayerPrefs.GetInt("Sound") == 1 && refererScreen == "GameScreen")
        {
            GetComponent<AudioSource>().PlayOneShot(gameOverSound,0.3f);
        }
        StartCoroutine(GetScores());
    }

    void Update()
    {
        screenUpTime += Time.deltaTime*2;
        if (refererScreen == "GameScreen" && (Input.GetKeyDown(KeyCode.Return) /*|| Input.GetKeyDown(KeyCode.R)*/ || Input.GetKeyDown(KeyCode.JoystickButton7)))
        {
            PlayAgain();
        }
        if (Input.GetKeyDown(KeyCode.Escape) || Input.GetKeyDown(KeyCode.JoystickButton6))
        {
            GoToStartScreen();
        }
    }

    void OnGUI()
    {<commit_msg>Revert "Bug Windows Store App"<commit_after>﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography;
using System;
using SimpleJSON;
using Score;

public class GameOverScript : MonoBehaviour 
{    
    public AudioClip gameOverSound;
    int score = 0;
    int rubies = 0;
    int moneyRubies = 0;
    string textTime = "00:00:000";
    string txtPlayerName = "";
    string refererScreen = "";
    float screenUpTime = 0f;

    string listMode = "24h";
    bool isShareOpen = false;

    //bool newInterface = true;
    public Texture2D[] characterButtons;
    public Texture2D characterBGbutton;
    public Texture2D[] numbersTexture;
    public Texture2D colonTexture;
    public Texture2D timerTexture;
    public Texture2D rubyTexture0;
    public Texture2D rubyTexture1;
    public Texture2D restartTexture;
    public Texture2D quitTexture;

    public Texture2D sendTexture;
    public Texture2D refreshTexture;
    public Texture2D loadingTexture;
    public Texture2D doneTexture;

    public Texture2D time24hTexture;
    public Texture2D timeAllTexture;
    public Texture2D selectedTexture;
    public Texture2D backTexture;

    public Texture2D shareTexture;
    public Texture2D facebookTexture;
    public Texture2D twitterTexture;
    public Texture2D googleplusTexture;

    public Texture2D scoreboardImageTexture;

    public Texture2D iosIconTexture;
    public Texture2D androidIconTexture;
    public Texture2D wpIconTexture;
    public Texture2D unityIconTexture;

    public Texture2D scoreFrameTexture, timerFrameTexture, rubyFrameTexture, scoreBGTexture;    
	
    void Start () 
    {        
        score = PlayerPrefs.GetInt ("Score");
        PlayerPrefs.DeleteKey("Score");
           
        rubies = PlayerPrefs.GetInt("Rubies", 0);
        PlayerPrefs.DeleteKey("Rubies");

        moneyRubies = PlayerPrefs.GetInt("MoneyRubies", 0);

        textTime = PlayerPrefs.GetString("Timer", "00:00:000");
        PlayerPrefs.DeleteKey("Timer");

        txtPlayerName = PlayerPrefs.GetString("PlayerName", "Anonymous");

        refererScreen = PlayerPrefs.GetString("RefererScreen", "GameScreen");
        PlayerPrefs.DeleteKey("RefererScreen");

        if (PlayerPrefs.GetInt("Sound") == 1 && refererScreen == "GameScreen")
        {
            GetComponent<AudioSource>().PlayOneShot(gameOverSound,0.3f);
        }
        StartCoroutine(GetScores());
    }

    void Update()
    {
        screenUpTime += Time.deltaTime*2;
        if (refererScreen == "GameScreen" && (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.R) || Input.GetKeyDown(KeyCode.JoystickButton7)))
        {
            PlayAgain();
        }
        if (Input.GetKeyDown(KeyCode.Escape) || Input.GetKeyDown(KeyCode.JoystickButton6))
        {
            GoToStartScreen();
        }
    }

    void OnGUI()
    {
{'fraction_non_alphanumeric': 0.09108225108225108, 'fraction_numerical': 0.020432900432900435, 'mean_word_length': 3.176428054953001, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1871563', 'n_tokens_mistral': 1790, 'n_tokens_neox': 1698, 'n_words': 366}