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

public enum WeaponType
{
	Rock,
	Marble,
	Jack,
	Bone,
	Cat,
	Wand1,
	Wand2,
	Wand3
};

public class GetItem : MonoBehaviour {
	public WeaponType weaponType;
	public int posX;
	public int posY;


	public void GiveWeaponToPlayer(WeaponType weaponType)
	{
		switch (weaponType) 
		{
		case(WeaponType.Rock) :
			{
				//Permettre l'utilisation dans l'interface
				break;
			}
		case(WeaponType.Bone) :
			{
				//Permettre l'utilisation dans l'interface
				break;
			}
		case(WeaponType.Jack) :
			{
				//Permettre l'utilisation dans l'interface
				break;
			}
		case(WeaponType.Marble) :
			{
				//Permettre l'utilisation dans l'interface
				break;
			}
		case(WeaponType.Cat) :
			{
				//Permettre l'utilisation dans l'interface
				break;
			}
		}

	}




	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}<commit_msg>Ajout de script pour avoir des items<commit_after>﻿using UnityEngine;
using System.Collections;

public enum WeaponType
{
	Rock,
	Marble,
	Jack,
	Bone,
	Cat,
	Wand1,
	Wand2,
	Wand3
};

public class GetItem : MonoBehaviour {
	public WeaponType weaponType;
	public int posX;
	public int posY;
	private HeroScript hero;
	private bool itemTaken;


	public void GiveWeaponToPlayer(WeaponType weaponType)
	{
		if (!itemTaken) {
			switch (weaponType) {
			case(WeaponType.Rock):
				{
					//Permettre l'utilisation dans l'interface
					Debug.Log ("Tu as pris une roche !");
					break;
				}
			case(WeaponType.Bone):
				{
					//Permettre l'utilisation dans l'interface
					break;
				}
			case(WeaponType.Jack):
				{
					//Permettre l'utilisation dans l'interface
					break;
				}
			case(WeaponType.Marble):
				{
					//Permettre l'utilisation dans l'interface
					break;
				}
			case(WeaponType.Cat):
				{
					//Permettre l'utilisation dans l'interface
					break;
				}
			}
		}

	}




	// Use this for initialization
	void Start () {
		hero = GameObject.FindObjectOfType<HeroScript>();
	}

	void OnMouseUp(){
		//Vérification de la distance
		int posHeroX = hero.mouvements.posX;
		int posHeroY = hero.mouvements.posY;
		if (posX == posHeroX && posY == posHeroY + 1) 
		{
			GiveWeaponToPlayer (weaponType);
			itemTaken=true;
		}
		if (posX == posHeroX && posY == posHeroY - 1)
		{
			GiveWeaponToPlayer (weaponType);
			itemTaken=true;
		}
		if (posY == posHeroY && posX == posHeroX + 1)
		{
			GiveWeaponToPlayer (weaponType);
			itemTaken=true;
		}
		if (posY == posHeroY && posX == posHeroX - 1)
		{
			GiveWeaponToPlayer (weaponType);
			itemTaken=true;
		};
	}


	// Update is called once per frame
	void Update () {

	}
}
{'fraction_non_alphanumeric': 0.10975157582499073, 'fraction_numerical': 0.0037078235076010383, 'mean_word_length': 2.843304843304843, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '342974', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1010, 'n_words': 226}