/*
 * BOS done by Bug Games Team - www.Bug-Games.net - @BugGames - info@bug-games.net
 * BOS game was an entry for Global Game Jam 2015 www.GlobalGameJam.com
 * Programmer: Danar Kayfi - @DanarKayfi
 * Artiest: Mohammad Al-Dmour - @LightOfDarkness
 * Everything (Code+Art) in this game belongs to Bug Games Team.
 * Some SFX are from soundbible.com.
 */
using UnityEngine;
using System.Collections;

public class player_script : MonoBehaviour 
{
	static public bool move = false;
	static public bool turn = false;

	// Use this for initialization
	void Start () 
	{
		move = false;
		turn = false;
	}
	
	// Update is called once per frame
	void Update () 
	{
		if(move)
			transform.Translate(Vector3.up * Time.deltaTime /1.5f);

		if(turn)
			transform.Rotate(Vector3.forward * Time.deltaTime * 20);
	}

	void OnTriggerEnter2D(Collider2D other) 
	{
		if(other.tag == "border")
		{
			Application.LoadLevel ("Scene_Game");
		}

		if(other.tag == "goal")
		{
			Application.LoadLevel ("Scene_Winner");
		}

	}
}
