#pragma strict
var touchedbigsphere: boolean;
var touchedplane: boolean;

function Start () {
	touchedbigsphere = false;
	touchedplane = false;
}

function Update () {

	if(Input.GetKey(KeyCode.AltGr))
	{
		GameObject.FindGameObjectWithTag("bigsphere").transform.position.y = 1;
	}
}

function OnCollisionEnter(collision : Collision) 
{
		if(collision.collider.tag == "bigsphere")
		{
			if(!touchedplane)
			{
				this.gameObject.renderer.material.color = Color.blue;
			}
			else
			{
				this.gameObject.renderer.material.color = Color.cyan;
			}
			touchedbigsphere = true;
		}
		else if(collision.collider.tag == "plane")
		{
			if(!touchedbigsphere)
			{
				this.gameObject.renderer.material.color = Color.yellow;
			}
			else
			{
				this.gameObject.renderer.material.color = Color.red;
			}
			touchedplane = true;
		}
		
		
}