using UnityEngine;
using System.Collections;

public class Hero_Logic : MonoBehaviour {

	private global_variables variable_script;
	
	private GameObject gameManager;
	
	// Use this for initialization
	void Start () {
		gameManager = GameObject.FindGameObjectWithTag ("GameController").gameObject;
		variable_script = gameManager.GetComponent<global_variables> ();
	}
	
	// Update is called once per frame
	void Update () {
		if (variable_script.dialoguePosition == 3) {
						transform.localScale = new Vector3 (1, 1, 1);
						Invoke ("dead",3f);
				}
	}

	void dead(){
				transform.Rotate (0, 0, 180);
				transform.position = new Vector3 (94.5f, -2.47f, 0f);
		}
}
