// LOAD TEXTURE RESOURCES public void initResources () { // MENU PAUSE this.backgroundTexture = Resources.Load<Texture2D>("PauseMenu/background_pause"); this.continueTexture = Resources.Load<Texture2D>("PauseMenu/continue"); this.hoverContinueTexture = Resources.Load<Texture2D>("PauseMenu/hover_continue"); this.resetTexture = Resources.Load<Texture2D>("PauseMenu/reset"); this.hoverResetTexture = Resources.Load<Texture2D>("PauseMenu/hover_reset"); this.optionTexture = Resources.Load<Texture2D>("PauseMenu/option"); this.hoverOptionTexture = Resources.Load<Texture2D>("PauseMenu/hover_option"); this.exitTexture = Resources.Load<Texture2D>("PauseMenu/exit"); this.hoverExitTexture = Resources.Load<Texture2D>("PauseMenu/hover_exit"); // MENU CONFIRM this.confirmTexture = Resources.Load<Texture2D>("PauseMenu/background_confirm"); this.yesTexture = Resources.Load<Texture2D>("PauseMenu/yes"); this.hoverYesTexture = Resources.Load<Texture2D>("PauseMenu/hover_yes"); this.noTexture = Resources.Load<Texture2D>("PauseMenu/no"); this.hoverNoTexture = Resources.Load<Texture2D>("PauseMenu/hover_no"); this.music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> (); }
// 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 () { 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); }
// Use this for initialization void Start () { atk_script = attack_range.GetComponent<Player_Attack_System_lvl2> (); music = GameObject.FindGameObjectWithTag("music_engine").GetComponent<Music_Engine_Script> (); controller = this.gameObject.GetComponent<CharacterController> (); //animation["metarig|Caminar"].speed = 2.75f; //animation ["metarig|Atacar"].speed = 1.25f; destinationPosition = transform.position; }
// Use this for initialization void Start () { string str; for (int i=1; i<9; i++) { if(i<4 || i==5) str = "Skeleton"+i; else str = "MiniIceDemon"+i; if(i==4 || i==6) stage_npcs[i] = 1; else stage_npcs[i] = GameObject.FindGameObjectsWithTag (str).Length; stage_npcs[8] += 1; } music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> (); }
// 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 () { //trophy_q = new Queue<Texture2D>(); trofeos = new bool[18]; trophy_unlock = new string[18]; this.loadTrophys (); TrophyTexture = Resources.Load<Texture2D>("Trofeos/trophy_platino"); this.music = GameObject.FindGameObjectWithTag("music_engine").GetComponent<Music_Engine_Script>(); }
// 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 () { 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); }
// Use this for initialization void Awake () { // ADD COMPONENT /* // Buscamos al personaje principal this.NPCs = GameObject.FindGameObjectsWithTag("Enemy"); this.boss = GameObject.FindGameObjectWithTag("Boss"); */ 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(); // ADD TEXTURES this.LevelUpTexture = Resources.Load<Texture2D>("Misc/levelup"); }
// 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 (); }
// Use this for initialization void Start () { music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> (); }
// Use this for initialization void Start () { seeker = GetComponent<Seeker>(); player = GameObject.FindGameObjectWithTag("Player"); player_transform = player.transform; anim = GetComponent<Animator>(); difficulty = PlayerPrefs.GetString ("Difficult"); npcAttributes.setDificulty (difficulty); //this.NPCbar = GameObject.FindGameObjectWithTag("NPCHealth"); this.trofeos = GameObject.FindGameObjectWithTag("Trofeos").GetComponent<TrophyEngine>(); this.music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> (); controller = GetComponent<CharacterController>(); }
// Use this for initialization void Awake () { // --- LOAD RESOURCES TO CHARACTER --- this.prefab = Resources.Load<Transform>("Prefabs/MainCharacters/" + PlayerPrefs.GetString("Player")); Instantiate (prefab); this.character = GameObject.FindGameObjectWithTag ("Player"); this.invent = this.character.GetComponentInChildren <InventoryScript> (); this.map = GameObject.FindGameObjectWithTag ("Minimap").GetComponent<miniMapLv1> (); this.cm = this.character.GetComponent<ClickToMove> (); this.cs = this.character.GetComponent<CharacterScript> (); // 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 (); this.npc_boss = GameObject.FindGameObjectWithTag("Boss"); this.npc_enemy = GameObject.FindGameObjectsWithTag("Enemy"); this.camera1 = GameObject.FindGameObjectWithTag ("MainCamera"); this.camera1.SetActive (true); this.camera2 = GameObject.FindGameObjectWithTag ("CameraGoal"); this.camera2.SetActive (false); this.music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> (); // --- LOAD RESOURCES TO MENU --- gui = new PauseMenuGUI (); gui.initResources (); this.c = this.ambientLight.light.color; pause = false; }
// ========================= COLISION CON Player ================================== void Start(){ arma1.SetActive(false); arma2.SetActive(false); arma3.SetActive(false); music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> (); }
// LOAD TEXTURE RESOURCES public void initResources () { this.level = PlayerPrefs.GetInt ("Level"); // Memory Card Save/Load data this.mc = GameObject.FindGameObjectWithTag ("MemoryCard").GetComponent<MemoryCard> (); this.save = this.mc.saveData (); this.invent = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <InventoryScript> (); this.map = GameObject.FindGameObjectWithTag ("Minimap").GetComponent<miniMapLv1> (); this.map2 = GameObject.FindGameObjectWithTag ("Minimap").GetComponent<miniMapLv2> (); this.shadow = GameObject.FindGameObjectWithTag("Light"); this.audio = GameObject.FindGameObjectWithTag("Audio"); // MENU PAUSE this.backgroundTexture = Resources.Load<Texture2D>("PauseMenu/background_pause"); this.continueTexture = Resources.Load<Texture2D>("PauseMenu/continue"); this.hoverContinueTexture = Resources.Load<Texture2D>("PauseMenu/hover_continue"); this.resetTexture = Resources.Load<Texture2D>("PauseMenu/reset"); this.hoverResetTexture = Resources.Load<Texture2D>("PauseMenu/hover_reset"); this.controlTexture = Resources.Load<Texture2D>("PauseMenu/controls"); this.hoverControlTexture = Resources.Load<Texture2D>("PauseMenu/hover_controls"); this.optionTexture = Resources.Load<Texture2D>("PauseMenu/option"); this.hoverOptionTexture = Resources.Load<Texture2D>("PauseMenu/hover_option"); this.exitTexture = Resources.Load<Texture2D>("PauseMenu/exit"); this.hoverExitTexture = Resources.Load<Texture2D>("PauseMenu/hover_exit"); // MENU KEYWORD this.keywordTexture = Resources.Load<Texture2D>("PauseMenu/keyword"); // MENU CONFIRM this.confirmTexture = Resources.Load<Texture2D>("PauseMenu/background_confirm"); // MENU OPTION this.backgroundOptionTexture = Resources.Load<Texture2D>("PauseMenu/background_opciones"); this.checkTexture = Resources.Load<Texture2D>("PauseMenu/checked_checkbox"); this.unCheckTexture = Resources.Load<Texture2D>("PauseMenu/unchecked_checkbox"); this.yesTexture = Resources.Load<Texture2D>("PauseMenu/yes"); this.hoverYesTexture = Resources.Load<Texture2D>("PauseMenu/hover_yes"); this.noTexture = Resources.Load<Texture2D>("PauseMenu/no"); this.hoverNoTexture = Resources.Load<Texture2D>("PauseMenu/hover_no"); this.music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> (); }
// 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> (); }
// Use this for initialization void Start () { seeker = GetComponent<Seeker>(); player = GameObject.FindGameObjectWithTag("Player"); player_transform = player.transform; anim = GetComponent<Animator>(); difficulty = PlayerPrefs.GetString ("Difficult"); npcAttributes.setDificulty (difficulty); this.health_sphere = Resources.Load<GameObject> ("Prefabs/Effects/life_sphere"); this.mana_sphere = Resources.Load<GameObject> ("Prefabs/Effects/mana_sphere"); this.trofeos = GameObject.FindGameObjectWithTag("Trofeos").GetComponent<TrophyEngine>(); this.music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> (); controller = GetComponent<CharacterController>(); }
// Use this for initialization void Start () { stg_ctrl = GameObject.FindGameObjectWithTag ("GameController").GetComponent<StageController> (); particle = gameObject.GetComponent<ParticleSystem> (); music = GameObject.FindGameObjectWithTag ("music_engine").GetComponent<Music_Engine_Script> (); }
// Use this for initialization void Start () { music = GameObject.FindGameObjectWithTag("music_engine").GetComponent<Music_Engine_Script>(); music.play_Lethalknife_Shot (); }