// Use this for initialization
	void Start () {
		name = npc.tag.Substring (0, npc.tag.Length - 1);
		//this.npc = GameObject.FindGameObjectWithTag ("Enemy");

		if (name == "Skeleton") {
			this.skel = this.npc.GetComponent<Skeleton_controller_2> ();
			this.resize_health = Mathf.Pow(this.skel.actual_health / this.skel.health, -1);
		} 
		else if (name == "FireDemon" || name == "IceDemon" || name == "MiniIceDemon") {
			this.demon = this.npc.GetComponent<FireDemon_Controller> ();
			this.resize_health = Mathf.Pow(this.demon.actual_health / this.demon.health, -1);
		}
		else if(this.npc.tag == "IceGolem"){
			this.golem = this.npc.GetComponent<Ice_Golem_controller> ();
			this.resize_health = Mathf.Pow(this.golem.actual_health / this.golem.health, -1);
		}
		else if(this.npc.tag == "Boss"){
			this.boss = this.npc.GetComponent<Skeleton_boss_controller> ();
			this.resize_health = Mathf.Pow(this.boss.health / this.boss.total_health, -1);
		}

		// ADD TEXTURES
		this.HealthTexture = Resources.Load<Texture2D>("NPC/NPCbar_health");
		this.HealthBarTexture = Resources.Load<Texture2D>("NPC/NPCbar");
		
		this.health = 0f;
		
	}
	// Use this for initialization
	void Start () {
		player = GameObject.FindGameObjectWithTag ("Player");
		move_script = player.GetComponent <ClickToMove_lvl2> ();
		skill_script = player.GetComponent <Skill_Controller> ();
		action_bar = GameObject.FindGameObjectWithTag ("ActionBar").GetComponent <ActionBarScript> ();
		boss_ctrl = boss.GetComponent <Skeleton_boss_controller> ();
		fade_out = fade.GetComponent<FadeOut_lvl2> ();

		// Memory Card Save/Load data
		this.mc = GameObject.FindGameObjectWithTag ("MemoryCard").GetComponent<MemoryCard> ();
		this.save = this.mc.saveData();
		this.load = this.mc.loadData();

		boss_ctrl.teleportToRespawn ();
		boss_ctrl.rotateToPlayer (playerPos.transform.position);
		
		move_script.teleport (playerPos.transform.position);
		player.transform.position = playerPos.transform.position;
		move_script.rotateToPos (boss.transform.position);
		
		move_script.enabled = false;
		skill_script.enabled = false;
		action_bar.enabled = false;
		
		player_hand = GameObject.FindGameObjectWithTag ("PlayerHand");
		firepunch = Resources.Load <GameObject> ("Lvl2/prefabs/Fire_punch");
		finalFireball = Resources.Load <GameObject> ("Lvl2/prefabs/Final_Fireball");
		
		dialogs[0] = Resources.Load<Texture2D>("Lvl2/Dialogs/boss_dialog_6");
		dialogs[1] = Resources.Load<Texture2D>("Lvl2/Dialogs/boss_dialog_7_"+PlayerPrefs.GetString ("Player"));
		
		timer = Time.time + 1.5f;
	}
	// Use this for initialization
	void Start () {
		player = GameObject.FindGameObjectWithTag ("Player");
		music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> ();
		move_script = player.GetComponent <ClickToMove_lvl2> ();
		skill_script = player.GetComponent <Skill_Controller> ();
		action_bar = GameObject.FindGameObjectWithTag ("ActionBar").GetComponent <ActionBarScript> ();
		boss_ctrl = boss.GetComponent <Skeleton_boss_controller> ();

		dialogs[0] = Resources.Load<Texture2D>("Lvl2/Dialogs/boss_dialog_3");
		dialogs[1] = Resources.Load<Texture2D>("Lvl2/Dialogs/boss_dialog_4");
		dialogs[2] = Resources.Load<Texture2D>("Lvl2/Dialogs/boss_dialog_5_"+PlayerPrefs.GetString ("Player"));

		timer = Time.time + 1.5f;
		camera_timer = Time.time;
	}
	// Use this for initialization
	void Start () {
		music = GameObject.FindGameObjectWithTag("music_engine").GetComponent<Music_Engine_Script>();
		char_script = GameObject.FindGameObjectWithTag ("Player").GetComponent<CharacterScript> ();
		music.Play_Barrel_Open ();
		boss = GameObject.FindGameObjectWithTag ("Boss").GetComponent<Skeleton_boss_controller> ();
	}