void Start() { unitManager = GameObject.FindGameObjectWithTag("PlayerUnitManager").GetComponent<UnitManager>(); attackMoveIndicator = GameObject.FindGameObjectWithTag("PlayerUnitManager").GetComponent<AttackMoveIndicatorScript>(); mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); pauseMenu = mainCamera.GetComponent<PauseMenuGUI>(); }
// 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; }
void Start() { unitManager = GameObject.FindGameObjectWithTag("PlayerUnitManager").GetComponent <UnitManager>(); attackMoveIndicator = GameObject.FindGameObjectWithTag("PlayerUnitManager").GetComponent <AttackMoveIndicatorScript>(); mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); pauseMenu = mainCamera.GetComponent <PauseMenuGUI>(); }
void Start() { pauseMenu = gameObject.GetComponent<PauseMenuGUI>(); }
// Use this for initialization void Start () { this.gui = new PauseMenuGUI (); this.gui.initResources (); }
// 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; }
void Start() { unitManager = GameObject.FindGameObjectWithTag("PlayerUnitManager").GetComponent <UnitManager>(); pauseMenu = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <PauseMenuGUI>(); doubleClickStart = 0.0f; }
void Start() { unitManager = GameObject.FindGameObjectWithTag("PlayerUnitManager").GetComponent<UnitManager>(); pauseMenu = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<PauseMenuGUI>(); doubleClickStart = 0.0f; }
void Start() { pauseMenu = gameObject.GetComponent <PauseMenuGUI>(); }