using UnityEngine;
using System.Collections;

public class EventSheet : MonoBehaviour {

	[HideInInspector]
	public string message;
	GameObject Tempobj;
	public string journalentry = "Mother and Son killed by asphyxiation.\r\nFather fell to his death from the balcony.";

	public string myOpeningLine()
	{
		message= "Police report said the family died in suspicious circumstances.\r\n"

		+"Both mother and son suffocated while asleep. Father fell to his death from their apartment window.\r\nNo suspects were found, which led the police to believe it was a father murder suicide. But I shouldn’t be here if it was that simple.\r\nThe family is restless, and hasn’t moved on. Surely there’s something more to their story.\r\n"
		
		+"\r\n \r\nWhile helping the restless, I  must challenge them to help move them on, but I mustn't push them in the wrong direction, or force them to face truths without knowing all the facts.\r\n\r\nI risk my own sanity by doing so.";
		return message;
	}

	public void firstPerspective2() // Mothers Opening
	{
		message = "I remember being mad at him.\r\nI remember being so incredibly mad that I couldn’t cry.\r\n"

			+"17 years married, but this was the first time he had forgotten our anniversary.\r\nI know he was busy, I know work had him under more pressure then I ever remember,\r\nbut he still forgot the most important thing in his life.\r\nHe didn’t forget an event, he forgot me.\r\n"

				+"Carl was with a friend, so I cooked dinner ready for when Jacob came home.\r\nWe had the place to ourselves, and I thought it would be a great time for us to celebrate and remember.\r\n"

				+"But thats not what happened.\r\n"

				+"He came home in a fluster, stressed and high strung\r\n. He barely muttered a word to me.\r\nI mentioned I had cooked, that I had prepared something special, and he just muttered a thanks as his laptop was pulled onto the table. And that was it.\r\n"

				+"I didn’t say anything. I should have.\r\nI know that now.\r\n"

				+"I should have said how mad I was.\r\n"

				+"I should have said how disappointed I was.\r\n"

				+"How hurt I was.\r\n"

				+"I should have told him that actually all those things still didnt matter.\r\n"

				+"All that mattered was I still loved him. That we had each other. We had our son.\r\n"

				+"I should have said all these things. But I didn’t.\r\n"

				+"I couldn’t\r\n"

				+"I didnt know it was my last chance.\r\nI didnt know that when I turned on the TV that night it would be the last time I cooked dinner for him.\r\nI didn’t know that when I saw my son go into his room that I wouldn’t have a chance to see him again.\r\nTo kiss him, to hold him.\r\nTo watch him laugh or crack wise.\r\nI wouldn’t be there anymore to comfort him.\r\nI wouldn’t be there to help protect him… from this.\r\n"

				+"I went to bed before my husband. I left him with the kitchen lamp on, alone in his work.\r\n"

				+"I cried myself to sleep.\r\n";
				Debug.Log (message);
				journalentry = "\r\nThey all died on Laura and Jacob’s 17th wedding anniversary.\r\nLaura and Carl were asleep before Jacob.\r\n";
				BroadCasttoGUI ();
	}

	public void firstPerspective1() // Fathers Opening
	{
		message = "I should have been more attentive.\r\nShould have listened and seen what was going on around me.\r\nSeen the effort Laura made for me.\r\nSeen the woman who was still looking after me, still loving me.\r\n"

				+"Instead, all I could think about was work, and what happened on that day.\r\n"
					
				+"I knew he was mad, that somehow I had to make it up to him.\r\nBut no amount of research would reveal an easy recovery.\r\nAn easy way back from the huge mistake I had made.\r\nI had cost him big, and there was no easy way to make up for it.\r\nNo way of sorting this mess out quick and easy.\r\n"

				+"I didn’t know how he would react.\r\n"

				+"I had imagined all the possibilities sure, but I never believe he would explode like he did.\r\nHe threatened my job.\r\nHe cursed my family.\r\nHe cursed my life."

				+"When I left the office I was physically shaking.\r\nMy armpits were damp and my mind racing.\r\nI couldn’t think straight.\r\n"

				+"When I got home my mind was blank, focused on nothing but the hurt my dumb luck I had caused.\r\nThe issue at hand.\r\nSomehow I had to make it up, somehow I had to fix the situation or I might never be able to recover.\r\nMy life would be over as I know it.\r\nIf that had gotten any worse, my family and I would be finished.\r\n"

				+"I wouldn’t let that happen.\r\nWe wouldn’t go down that road.\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}

	public void firstPerspective3() // Sons Opening
	{
		message= "My memory of that night is very hazy.\r\n"

			+"I remember coming home from my friend Darren’s house.\r\nIt was quarter past ten.\r\nI remember because my mom gave me a hard time for being home late home.\r\nShe was on the couch, watching a recording of Americas Next Top model.\r\nDad was on the kitchen table, working as usual.\r\nHe was so focused on his work that he merely grunted as I said hi on my way to my bedroom.\r\n"

				+"I watched tv for a while, but when they started arguing I turned it off.\r\nIt wasn’t the first time they fought.\r\nAnd it was getting really regular.\r\n"

				+"Instead, I turned off the lights, got into bed, and tried to ignore them by listening to my iPod on full volume.\r\n"

				+"I must have fallen asleep with my earphones in.\r\nI don’t remember ever taking them off.\r\n"

				+"I can’t remember the song.\r\nI cant remember.\r\n"

				+"I thought it was Dad at first.\r\nBut it wasn’t. He paused at my door, and stood at an awkward angle.\r\n"

				+"I never saw his face.\r\nInstead, all I remember is that smell.\r\nThat awful stink of whiskey on his breath.\r\n"

				+"All I can remember is that smell. And the shimmer.\r\n"

				+"Yeah, a shimmer from the street light hit his eyes. He was wearing glasses.\r\n"

				+"Then drowning. Like all I wanted to do was catch my breath but I couldn’t. \r\nI knew what I wanted to do, but I couldn’t do it. It was too heavy. I couldn’t breathe. I was drowning.\r\n"

				+"I don’t remember anything else.\r\n";
		Debug.Log (message);
	}

	public void photoPerspective2()
	{
		message = "Our wedding day, it was such a wonderful day.\r\nThis is one of my favourite photos of the day.\r\nSure we have a full album of professional photos, but this captures something unique about the day.\r\nIts the only photo of the day to feature so many of our closest friends.\r\n"

			+"Thats Chris, behind me.\r\nJacob’s business partner.\r\nThey went to college together.\r\nWorked together, and then decided to go into business together.\r\nI remember the day they decided to start the company.\r\nJacob was so happy, so excited for the future.\r\nIt was a much simpler time. A better time.\r\nI guess you could say Chris is the other part of Jacobs life. He made a lot of his dreams come true.\r\n"

				+"Hmmm… who else strikes out from this photo?\r\n"

				+"Brian, you see the bald guy to the right of Jacob?\r\nIn the white shirt with no jacket? He’s such a sweet man.\r\nWhen Jacobs father died, Jacob was very young. Brian stood up as a father figure for Jacob.\r\nHe was always there when he needed him. Always supported him, encouraged him.\r\n"

				+"And there’s Matthew.\r\nJust to the right of Brian.\r\nSharp suit? He’s glancing over at me and Jacob. He… He was… You know what?I’m tired of this photo.\r\nIts so… draining.\r\n";
		Debug.Log (message);
	}

	public void photoPerspective3()
	{
		message = "Mum and Dads wedding. They looked so happy back then. Im not sure how many of these I know...\r\n"

				+"Oh, there’s Uncle Matt. He’s not so much an uncle as he is a great friend to my dad. But I’ve always called him uncle.\r\nI remember some good times with all three of us.\r\nHe has a house down the country beside the sea where we went fishing when I was younger.\r\nI don’t see him much anymore, I miss those times with him and Dad.\r\n"

				+"And Grandpa, again, not so much my grandpa.\r\nBut he treats dad likes hes a son.\r\nI never got to know him well.\r\nHe’s much older now then this photo.\r\nHe never really makes sense to me. Like he’s trying to relate but he just doesn't get it.\r\n"

				+"Wow… Is that Chris? I didn’t realise he was in this photo.\r\nHe looks much older now, but he’s the guy who works with dad.\r\nHe seems nice enough. Although when dad meets up with him it usually stresses him out.\r\nThats probably more work than Chris though.\r\n";
		Debug.Log (message);
	}

	public void photoPerspective1()
	{
		message = "I sometimes forget this is here. You know? You walk by a photo every day of your life it just becomes part of the scenery.\r\nI know I value that day because it was the day I married Laura, but honestly I regret things too.\r\nI regret my best man, Travis, the idiot, I haven’t spoken to him in what must be a decade.\r\n"

				+"But there’s Chris, behind me. I can’t believe I let him down the way I did.\r\nAnd I can’t believe he reacted the way he did. Seriously.\r\n If what happened had not happened, I’m not sure I would have been able to repair the damage I caused.\r\n"

				+"Hah, and Brian. What a man. I love him so much.\r\nI didn’t have a dad. He passed before I got to know him. But Brian? he was there when I needed him.\r\nHe wasn’t there 24/7 sure, but he was there when it mattered. At least, back then.\r\nHe’s not aging well. Time is catching up with him quicker then I think anyone thought it would.\r\nI wish he was here now. I wish I called on him that night.\r\n"

				+"Regrets. There’s Matthew. Like I said. A day were I regret a lot of things.\r\nI don’t see him much. I’m not sure I can ever let go, and move on.\r\nI miss my times with him and Carl when we were all much much younger. But that makes the pain worse.\r\nI can never let go. Never forget.\r\n";
		Debug.Log (message);
	}

	public void Clue101()
	{
		message = "There’s nothing useful on this.\r\nI wasn’t doing anything work related on my laptop that night.\r\nI was simply hiding.\r\nHiding from Laura, hiding from the conversation.\r\nI needed the head space to form a plan.\r\nI wasn’t very successful.\r\n ";
		Debug.Log (message);
		journalentry = "\r\nJacob wasn’t working when he came home, he was avoiding talking to his wife.";
		BroadCasttoGUI ();
	}

	public void Clue102()
	{
		message = "I hate this stupid thing.\r\nI hate the Company, I hate Chris for dragging him into it.\r\nEverytime I felt alone, it seemed he was working.\r\nAnd working at home.\r\nI hated that it came between us.\r\nI knew it was important, but this seemed to be always more important than me.\r\n";
		Debug.Log (message);
		journalentry = "\r\nJacob is a workaholic";
		BroadCasttoGUI ();
	}

	public void Clue103()
	{
		message = "Its not like the work he buries himself in leaves us much.\r\nWe’re still in this small flat, we’re still struggling to pay the bills.\r\nI think he cares about this most of all.\r\nAs if its a measure of his worth to me, as if I judge him by how he provides.\r\nI wish he could see I look for something bigger than that…\r\nI wish he did see.\r\n";
		Debug.Log (message);
		journalentry = "\r\nThe family is under serious financial strain";
		BroadCasttoGUI();
	}
	public void Clue104()
	{
		message = "He’s so focused on work, we never go to bed together anymore.\r\nHe seems lost in his own world.\r\nDistant.\r\nStressed.\r\nEven now,\r\nin this place lost and lonely place,\r\nhe’s stressed.\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue105()
	{
		message = "Maybe I should call Brian?\r\nI know we haven’t talked, and as much as I want to blame him for not checking in, I know I’m responsible too.\r\nWe’re both to blame for us not talking.\r\nBut a call right now?\r\nIf someone knew a way to get out of this mess, to fix it, it would be Brian.\r\nBut I don’t think its possible.\r\nAnd I don’t think I can handle it right now.\r\nI can’t handle that conversation.\r\nThe questions.\r\nIts easier to leave him out of it.\r\n";
		journalentry = "Its been a long time since Brian and Jacob last talked.";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue106()
	{
		message = "Did I go to bed that night?\r\nDid I get to sleep before the end?\r\nI can’t remember.\r\nI can’t remember what happened after Laura went to bed.\r\nDid I fall asleep on my laptop?\r\nIt wouldn’t be the first time.\r\nBut I can’t remember….\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue107()
	{
		message = "I asked my parents for an Xbox, but I may as well have asked two deaf people.\r\nI know money is an issue, but wasn’’t that the point of this business dad started up?\r\nIf not for money what’s the point?\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue108()
	{
		message = "I remember hearing them arguing.\r\nAnd I remember thinking of Uncle Matt while I lay down, trying to ignore them.\r\nYears ago Mom and Dad did more then stay in every night and argue occasionally.\r\nYears ago they had friends like Uncle Matt and seemed to enjoy themselves more.\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue109()
	{
		message = "I remember hearing them arguing.\r\nAnd I remember thinking of Uncle Matt while I lay down, trying to ignore them.\r\nYears ago Mom and Dad did more then stay in every night and argue occasionally.\r\nYears ago they had friends like Uncle Matt and seemed to enjoy themselves more.\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue201()
	{
		message = "I quickly learned that if I turned off the lights, they wouldn’t come in. I didnt want to talk to them when they yelled at each other.\r\nIt was always just… awkward. I think they thought so too, it’s not like they believed I was asleep that early in the evening.\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue202()
	{
		message = "I hated thinking about what Carl thought of us.\r\nI dreaded to think of what he thought about me.\r\nI didn’t want him with that stress and fear in his life.\r\nI wanted him to have a happy home. But lately all he was witnessing was two parents drifting further and further apart.\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue203()
	{
		message = "I thought about leaving. About climbing out my window, onto the fire escape, and just going somewhere, anywhere.\r\nI didn’t want to listen anymore. Maybe I could go somewhere like Uncle Matt’s or to Grandads.\r\nMaybe they’d give a shit, and get over their stupid fights.\r\n";
		Debug.Log (message);
		journalentry = "Things are so bad Carl has had serious thoughts on running away";
		BroadCasttoGUI ();
	}
	public void Clue204()
	{
		message = "I thought about leaving. Chris was a man who prefered confrontation.\r\nHe liked to address his problems head on. Maybe I could have taken a leaf from that book? Does it really matter?\r\nIt would not have changed the outcome of that night.\r\n";
		journalentry = "Chris is a man who prefers confrontation, addressing problems head on.";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue205()
	{
		message = "Maybe I should have said something. Forced the conversation.\r\nIt seems trivial, but whenever we had a fight, if one of us made tea for the other, it was usually the start of us talking it out.\r\nBut since Matt, those times have faded. I haven’t felt respected enough. Trusted enough, to have those types of moments with him.\r\n ";
		journalentry = "Since Matt is a significant footnote in the familys history.";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue206()
	{
		message = "I thought about Matt. I wanted to call him. He was always great with Jacob.\r\nGreat with Carl. He would know what to say. How to comfort me. How to encourage Carl, how to reassure Jacob.\r\nI know we drove him away, but did he mourn? Does he care that we’re gone, that I’m gone?\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue207()
	{
		message = "I remember this lamp. Why do I remember this lamp?";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue208()
	{
		message = "Laura had cooked. Made something special to celebrate. But I didn’t care. I couldn’t talk with her, confide in her.\r\nI hated coming to her with problems. She never knew what to say, or how to deal with them, so what was the point?\r\nShe would just say something irrelevant and then we’d fight.Maybe I should have said something anyway.\r\nWe usually ended up fighting one way or another.\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue209()
	{
		message = "That birthday card… It was the one I kept from Brian. From Grandad. What did it say again? … … … … \r\n“Be brave son, stand up tall and proud. Be the man your Father and I can be proud of.”\r\n";
		journalentry = "Carl had a treasured Birthday Card from his surrogate grandfather, Brian";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue210()
	{
		message = "The lamp… I remember… do I? It fell. Smashed off the floor. Why? … … \r\nDid I knock it off? When did it happen? How did it happen?";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue301()
	{
		message = "I know Jacob suspected. But I wonder how long he was suspicious.\r\nDid he ever find out and just hide it? Ignore it? Did it matter to him? I know Matt couldn’t handle it.\r\nHe couldn’t bear to spend time with Jacob not knowing if his best friend knew he was cheating with me.\r\n";
		journalentry = "Laura had an affair with Matt, but she’s unsure if Jacob ever found out.";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue302()
	{
		message = "I don’t know why Dad worked with Chris. Dad never seemed to have anything good to say about him.\r\nHe was always… intense. As if he always wanted to beat this guy who’s meant to be his friend.\r\nHe didn’t really care. he didn’t really care about Dad.\r\n";
		journalentry = "Carl called his Dad and Chris’s relationship as competitive.";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue303()
	{
		message = "I definitely knocked this over. I remember struggling.\r\nI remember wrestling on the bed and reaching for something.\r\nAnything. I felt the impact, heard the smash. But why?\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue304()
	{
		message = "I remember my dream that night. I was swimming, peaceful and relaxed.\r\nThe water around me was swallowed up by this massive hungry hole. And I was falling.\r\nPanic.\r\nThen I remember waking.\r\nThe horrible desperate feeling in the pit of my stomach.\r\nThis overwhelming force crushing down on me, smothering me, enveloping me.\r\nI couldn’t breath, and I couldn’t get whomever was on me off.\r\nThey pressed down with so much force and weight. I kicked and thrashed.\r\nScratching out at my attacker, but I couldn’t stop it.I was fading.Sleepy.Sleepy.Sleeping.Sleeping again.Dying.";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue305()
	{
		message = "There was a phone call the night before.\r\nMum was out, and I was in my room.\r\nDad must have forgotten I was home.\r\nHe was so angry, I’d swear the neighbours could have heard him.\r\nI don’t know who it was for sure, but I know I it was about work.\r\nSomething tells me it was Chris, but I can’t be sure.\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue306()
	{
		message = "I know what you’re thinking.\r\nI know what those cops are saying.\r\nBut I didn’t do this. I didn’t kill….\r\nI didn’t kill my wife and beautiful baby boy.\r\nI didn’t kill Carl and Laura.\r\nI didn’t kill myself. This is a mistake. An awful awful mistake.\r\nSomebody DID this to my family. Someone did this to my life.\r\nTo our lives. This CAN’T be me.\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue307()
	{
		message = "Was there something here? A light? A sound maybe?\r\n There’s something here I know.\r\nA sound.I heard a click. In my sleep I heard the click of someone flipping the electric heater on in the bathroom.\r\nBut that doesnt make sense.My parents wouldn’t turn the heater on in the bathroom in the middle of the night.\r\n";
		journalentry = "Carl remembers an unusual noise coming from the bathroom before his murderer entered the room.";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue308()
	{
		message = "There was a phone call the night before.\r\nMum was out, and I was in my room. Dad must have forgotten I was home.He was so angry, I’d swear the neighbours could have heard him.\r\nI don’t know who it was for sure, but I know I it was about work.\r\nSomething tells me it was Chris, but I can’t be sure.";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue309()
	{
		message = "I regret Matt. I do. I was confused.\r\nAngry at my husband, who was at a stage in his life where he seemed lost.\r\nDirectionless, depressed. I wasn’t there for him. I abandoned him.\r\nRan into the arms of his best friend and betrayed him in the deepest of ways.And he never knew.\r\nI know it.He would have said something, expressed something beyond the contempt he seemed to show Matt.\r\n";
		journalentry = "Laura is guilt ridden over the affair with Matt";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue310()
	{
		journalentry = "Laura is convinced they have drifted apart as a couple because of the hidden knowledge that once had an affair.sw";
		message = "He had suspicions, but he never knew for sure.\r\nI wish he never had that pain.\r\nMatt, never felt that way. He wanted me to leave him.\r\nTo take Carl and leave with him. I couldn’t do it. Truly? I still loved Jacob.\r\nMatt wasn’t enough, he was just a comfort for my pain.\r\nBut not a solution.\r\nMatt didn’t take it well. He drifted from me, angry maybe, or something else.\r\nHe said I’d regret it. Something about how he said has haunted me to this day.\r\nHe was so… bitter.";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void Clue311()
	{
		message = "I thought it was Dad at first.\r\nBut it wasn’t. He paused at my door, and stood at an awkward angle.\r\n I never saw his face. Instead, all I remember is that smell. That awful stink of whiskey on his breath.\r\nAll I can remember is that smell. And the shimmer.Yeah, a shimmer from the street light hit his eyes.\r\nHe was wearing glasses.Then drowning. Like all I wanted to do was catch my breath but I couldn’t.\r\nI knew what I wanted to do, but I couldn’t do it.\r\nIt was too heavy. I couldn’t breathe. I was drowning.\r\n";
		Debug.Log (message);
		BroadCasttoGUI ();
	}
	public void BroadCasttoGUI()
	{
		Tempobj = GameObject.Find ("GUIDisplay"); 
		Tempobj.GetComponent<GUIScript>().text = message;
		Tempobj = GameObject.Find ("Player");
		if(Tempobj.GetComponent<UIController>().journal != Tempobj.GetComponent<UIController>().journal + journalentry)
		{
			Tempobj.GetComponent<UIController>().journal = Tempobj.GetComponent<UIController>().journal + journalentry;
		}
	}
}