// Use this for initialization
void Start()
{
transform.localScale = new Vector3(Camera.main.orthographicSize/2 * (Screen.width/Screen.height),Camera.main.orthographicSize/2,1f);
audioSource = GetComponent<AudioSource> ();
if (HammerController.gameOverState == 1) {
//success
GetComponent<MeshRenderer> ().materials [0].mainTexture = textures [0];
movTerxture = (MovieTexture)GetComponent<MeshRenderer> ().materials [0].mainTexture;
movTerxture.Play();
audioSource.clip = music1;
audioSource.Play();
audioSource.PlayOneShot(voiceovers[0]);
}
else if(HammerController.gameOverState == 2 )
{
GetComponent<MeshRenderer> ().materials [0].mainTexture = textures [1];
movTerxture = (MovieTexture)GetComponent<MeshRenderer> ().materials [0].mainTexture;
movTerxture.Play();
audioSource.clip = music2;
audioSource.Play();
audioSource.PlayOneShot(voiceovers[1]);
}
}