// Use this for initialization
	void Start () {
		stage = GameObject.FindGameObjectWithTag ("GameController").GetComponent<StageController> ();
		stage.deactive_Stage (8);

		boss = GameObject.FindGameObjectWithTag ("Boss");
		player = GameObject.FindGameObjectWithTag ("Player");
		move_script = player.GetComponent <ClickToMove_lvl2> ();
		skill_script = player.GetComponent <Skill_Controller> ();
		action_bar = GameObject.FindGameObjectWithTag ("ActionBar").GetComponent <ActionBarScript> ();

		move_script.teleport (position.transform.position);
		player.transform.position = position.transform.position;
		move_script.rotateToPos (boss.transform.position);


		move_script.enabled = false;
		skill_script.enabled = false;
		action_bar.enabled = false;
		
		dialogs[0] = Resources.Load<Texture2D>("Lvl2/Dialogs/boss_dialog_1");
		dialogs[1] = Resources.Load<Texture2D>("Lvl2/Dialogs/boss_dialog_2_"+PlayerPrefs.GetString ("Player"));
		timer = Time.time + 3.5f;
		camera_timer = Time.time;

	}
	// 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;
	}
Example #3
0
 void ComponentCheck()
 {
     if (actionBarScript == null)
     {
         actionBarScript = FindObjectOfType <ActionBarScript>();
     }
     if (cinemachine == null)
     {
         cinemachine = FindObjectOfType <Cinemachine.CinemachineVirtualCamera>();
     }
     if (battleUIScript == null)
     {
         battleUIScript = FindObjectOfType <BattleUIScript>();
     }
     if (uIHandlerScript == null)
     {
         uIHandlerScript = FindObjectOfType <UIHandlerScript>();
     }
     if (questManager == null)
     {
         questManager = GetComponent <QuestManager>();
     }
     if (playerManager == null)
     {
         playerManager = FindObjectOfType <PlayerManagerScript>();
     }
 }
Example #4
0
 // Start is called before the first frame update
 void Start()
 {
     currentTurn = turnOrder[turnOrderPointer];
     turnHandler.setCurrentUnit(currentTurn);
     actionBarScript = GameObject.FindObjectOfType <ActionBarScript>();
     ComponentCheck();
     soundManager = FindObjectOfType <SoundManager>();
     UIUpdate();
 }
	// 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;
	}
Example #6
0
 // Use this for initialization
 void Start()
 {
     actionBar       = this.gameObject.transform.GetChild(0);
     actionBarScript = actionBar.gameObject.GetComponent <ActionBarScript>();
 }