// 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;

	}
Ejemplo n.º 2
0
	// Use this for initialization
	void Awake () {
		//print (PlayerPrefs.GetString("Difficult"));
		// --- LOAD RESOURCES TO CHARACTER ---
		//this.prefab = Resources.Load<GameObject>("Prefabs/MainCharacters/Level02/hombre_lvl2");
		this.prefab = Resources.Load<GameObject>("Prefabs/MainCharacters/Level02/"+PlayerPrefs.GetString("Player")+"_lvl2");
		this.character = Instantiate (prefab, respawn.transform.position, prefab.transform.rotation) as GameObject;
		this.cs = this.character.GetComponent<CharacterScript> ();
		this.cm = this.character.GetComponent<ClickToMove_lvl2> ();

		this.invent = this.character.GetComponentInChildren <InventoryScript> ();
		this.map = GameObject.FindGameObjectWithTag ("Minimap").GetComponent<miniMapLv2> ();
		this.music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> ();

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


		// --- LOAD RESOURCES TO MENU ---
		gui = new PauseMenuGUI();
		gui.initResources ();
		
		
		this.c = this.ambientLight.light.color;

	}
	// 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;
	}
Ejemplo n.º 4
0
	// Use this for initialization
	void Start () {
		this.character = GameObject.FindGameObjectWithTag ("Player");
		this.cm = this.character.GetComponent<ClickToMove> ();
		this.cm2 = this.character.GetComponent<ClickToMove_lvl2> ();
		this.music = GameObject.FindGameObjectWithTag("music_engine").GetComponent<Music_Engine_Script> ();
		destroy = false;
		this.sphere.SetActive(false);
	}
Ejemplo n.º 5
0
	// Use this for initialization
	void Start () {
		//
		this.fireball = Resources.Load<GameObject>("Prefabs/Character_Skills/Fireball_Skill");
		this.warrior_aura = Resources.Load<GameObject>("Prefabs/Character_Skills/Warrior_Aura1");
		this.dagger_shot = Resources.Load<GameObject>("Prefabs/Character_Skills/Daga_skill/Daga_skill");
		
		this.player = GameObject.FindGameObjectWithTag("Player");
		this.cs = this.player.GetComponent<CharacterScript_lvl2> ();
		this.cm = this.player.GetComponent<ClickToMove_lvl2> ();
		
		actual_time = Time.time;
	}
Ejemplo n.º 6
0
	// Use this for initialization
	void Start () {
		player = GameObject.FindGameObjectWithTag ("Player");
		player_move = player.GetComponent<ClickToMove_lvl2> ();
		skill_ctrl = player.GetComponent<Skill_Controller> ();
		action_bar = GameObject.FindGameObjectWithTag ("ActionBar");
		player_move.enabled = false;
		skill_ctrl.enabled = false;
		action_bar.SetActive (false);
	
		this.dialog1 = Resources.Load<Texture2D>("Lvl2/Dialogs/caution_fire_dialog");

		timer = Time.time;
	}
Ejemplo n.º 7
0
	// Use this for initialization
	void Start () {
		stage = GameObject.FindGameObjectWithTag ("GameController").GetComponent<StageController> ();
		stage.deactive_Stage (3);

		player = GameObject.FindGameObjectWithTag ("Player");
		music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> ();

		demon_anim = demon.GetComponent<FireDemon_Controller> ();
		move_script = player.GetComponent <ClickToMove_lvl2> ();
		skill_script = player.GetComponent <Skill_Controller> ();
		
		move_script.enabled = false;
		skill_script.enabled = false;
	}
	// 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;
	}
Ejemplo n.º 9
0
	void OnTriggerStay(Collider other) {
		if(other.tag == "Player") {
			player = GameObject.FindGameObjectWithTag ("Player");
			move_script = player.GetComponent <ClickToMove_lvl2> ();
			skill_script = player.GetComponent <Skill_Controller_lvl2> ();
			
			move_script.teleport (teleport_point.transform.position);
			
			move_script.enabled = false;
			skill_script.enabled = false;
			
			player.transform.position = teleport_point.transform.position;
			
			move_script.enabled = true;
			skill_script.enabled = true;
		}
	}
Ejemplo n.º 10
0
	// Use this for initialization
	void Start () {
	
		this.character = PlayerPrefs.GetString ("Player");

		this.list_inventory = new List<Item>();
		this.equip = new Item[5]; //"Weapon, Shield, Helmet, Armor, Boots"
		this.inventoryTexture = Resources.Load<Texture2D>("Inventory/Misc/inventory_" + this.character);
		this.map_lvl1 = GameObject.FindGameObjectWithTag ("Minimap").GetComponent<miniMapLv1> ();
		this.map_lvl2 = GameObject.FindGameObjectWithTag ("Minimap").GetComponent<miniMapLv2> ();
		//this.prueba = Resources.Load<Texture2D>("Inventory/Misc/slot");

		this.cs = GameObject.FindGameObjectWithTag ("Player").GetComponent<CharacterScript> ();
		this.cm = GameObject.FindGameObjectWithTag ("Player").GetComponent<ClickToMove> ();
		this.cm2 = GameObject.FindGameObjectWithTag ("Player").GetComponent<ClickToMove_lvl2> ();

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

		// STYLES TEXT
		this.attributes_style = new GUIStyle ();
		//this.text_style.font = Resources.Load<Font>("MainMenu/avqest");
		this.attributes_style.fontStyle = FontStyle.Bold;
		this.attributes_style.normal.textColor = new Color (236f/255f,219f/255f,31f/255f);
		this.attributes_style.fontSize = 20;

		this.exp_style = new GUIStyle ();
		//this.text_style.font = Resources.Load<Font>("MainMenu/avqest");
		this.exp_style.fontStyle = FontStyle.Bold;
		this.exp_style.normal.textColor = new Color (236f/255f,219f/255f,31f/255f);
		this.exp_style.fontSize = 17;

		this.level_style = new GUIStyle ();
		//this.text_style.font = Resources.Load<Font>("MainMenu/avqest");
		this.level_style.fontStyle = FontStyle.Bold;
		this.level_style.normal.textColor = new Color (236f/255f,219f/255f,31f/255f);
		this.level_style.fontSize = 13;

		// CREATE INVENTORY
		this.resizeInventory ();
		this.createInventorySlot ();

		int num = this.load.loadNumItemsInventory ();

		if (num > 0)
			this.load.loadInventoryItems (num);

		this.equip = load.loadEquipItem ();
	}