using UnityEngine;
using System.Collections;

public class WeddingPhotoBehaviour : MonoBehaviour {

	private int maxPerspective;
	private int currentPerspective;
	private GameObject eventSheet;
	private bool[] isFirst = new bool[]{true, true, true, true};

	void Start()
	{
		maxPerspective = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>().maxPerspective;
		eventSheet = GameObject.FindGameObjectWithTag("EventSheet");
	}

	void OnTriggerEnter(Collider other)
	{
		currentPerspective = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>().currentPerspective;

		if(other.tag == "Player")
		{
			if(isFirst[currentPerspective])
			{
				eventSheet.GetComponent<EventSheet>().BroadcastMessage("photoPerspective"+currentPerspective);
				isFirst[currentPerspective] = false;
			}
		}
	}
}
