// Use this for initialization
	void Start () {
		this.game_engine = GameObject.FindGameObjectWithTag ("GameController");
		this.health_bar = this.gameObject.GetComponent<NPCHealthBar_lvl2> ();
		this.game_script = game_engine.GetComponent <GameEngineLevel02_new> ();
		this.player = GameObject.FindGameObjectWithTag("Player");
		this.music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> ();
		this.player_transform = player.transform;
		this.player_script = player.GetComponent<CharacterScript> ();
		this.skill = Resources.Load<GameObject> ("Prefabs/Boss_Skills/Boss_skill_2");

		this.respawn = transform.position;
		this.health_bar.enabled = false;

		setAtrributesDifficulty (PlayerPrefs.GetString ("Difficult"));

		state = 0;
		Anim.animation.CrossFade (IdleAnimation.name, 0.12f);
	}
示例#2
0
	// Use this for initialization
	void Start () {
		this.player = GameObject.FindGameObjectWithTag("Player");
		this.player_script = player.GetComponent<CharacterScript> ();
		this.health_bar = this.gameObject.GetComponent<NPCHealthBar_lvl2> ();
		this.ctrl = GetComponent<CharacterController> ();
		this.stage = GameObject.FindGameObjectWithTag ("GameController").GetComponent<StageController> ();
		this.music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> ();
		this.respawn = transform.position;

		//this.health_bar.enabled = false;

		this.health_sphere = Resources.Load<GameObject> ("Lvl2/prefabs/Life_sphere_lvl2");
		this.mana_sphere = Resources.Load<GameObject> ("Lvl2/prefabs/Mana_sphere_lvl2");

		notAnim = !preanimation;

		setAtrributesDifficulty (PlayerPrefs.GetString ("Difficult"));

		state = 0;
		idleAnim ();
	}