<commit_before>﻿using UnityEngine;
using System.Collections;

public class GameController : MonoBehaviour {

	public int initialHealth = 100;
	public int maxBoost = 100;
	public GUIText scoreDescrLabel;
	public GUIText scoreLabel;
	public GUIText healthLabel;
	public GUIText healthDescrLabel;
	public GUIText boostLabel;
	public GUIText boostDescrLabel;
	public GUIText finalScoreLabel;
	public GameObject titleLabels;
	public GameObject gameoverLabels;
	public AudioClip beginGameClip;
	public AudioClip gameoverClip;
	
	public bool isTitleShowing = true;
	
	private int health;
	private int boost;
	private int score;
//	private int highScore;
	
	private bool isDead = false;
	
	// Use this for initialization
	void Start () {
		health = initialHealth;
		boost = maxBoost;
		score = 0;
//		highScore = 0;
		
		SetGameplayLabelsVisible(false);
		SetTitleLabelsVisible(true);
		SetGameoverLabelsVisible(false);
//		SetMusicPlaying(false);
		
		// Stop ships from generating
		GetComponent <ShipGenerator>().enabled = false;
	}
	
	void Update () {
		if (Input.GetButtonDown("Start")){
			if (isTitleShowing){
				isTitleShowing = false;
				
				//Update the labels on screen
				titleLabels.transform.position = new Vector3(-1, -1);
				SetGameplayLabelsVisible(true);
				
				GetComponent <ShipGenerator>().enabled = true;
				
				if (beginGameClip != null){
				 	AudioSource.PlayClipAtPoint(beginGameClip, Vector3.zero);
				}
				
//				SetMusicPlaying(true);
			}
			else if (isPlayerDead()){
				Application.LoadLevel("DefaultScene");
			}
		}
		if (isPlayerDead()){<commit_msg>Players can now touch screen to begin game<commit_after>﻿using UnityEngine;
using System.Collections;

public class GameController : MonoBehaviour {

	public int initialHealth = 100;
	public int maxBoost = 100;
	public GUIText scoreDescrLabel;
	public GUIText scoreLabel;
	public GUIText healthLabel;
	public GUIText healthDescrLabel;
	public GUIText boostLabel;
	public GUIText boostDescrLabel;
	public GUIText finalScoreLabel;
	public GameObject titleLabels;
	public GameObject gameoverLabels;
	public AudioClip beginGameClip;
	public AudioClip gameoverClip;
	
	public bool isTitleShowing = true;
	
	private int health;
	private int boost;
	private int score;
//	private int highScore;
	
	private bool isDead = false;
	
	// Use this for initialization
	void Start () {
		health = initialHealth;
		boost = maxBoost;
		score = 0;
//		highScore = 0;
		
		SetGameplayLabelsVisible(false);
		SetTitleLabelsVisible(true);
		SetGameoverLabelsVisible(false);
//		SetMusicPlaying(false);
		
		// Stop ships from generating
		GetComponent <ShipGenerator>().enabled = false;
	}
	
	void Update () {
		if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began){
//			Vector2 pos = Input.GetTouch(0).position;
			
			if (isTitleShowing){
				isTitleShowing = false;
				
				//Update the labels on screen
				titleLabels.transform.position = new Vector3(-1, -1);
				SetGameplayLabelsVisible(true);
				
				GetComponent <ShipGenerator>().enabled = true;
				
				if (beginGameClip != null){
				 	AudioSource.PlayClipAtPoint(beginGameClip, Vector3.zero);
				}
				
//				SetMusicPlaying(true);
			}
			else if (isPlayerDead()){
				Application.LoadLevel("DefaultScene");
			}
		}
		if (isPlayerDead()){
{'fraction_non_alphanumeric': 0.09292438505921652, 'fraction_numerical': 0.00850288490737929, 'mean_word_length': 3.931137724550898, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, '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': '5086061', 'n_tokens_mistral': 1196, 'n_tokens_neox': 994, 'n_words': 266}