private void Awake() { script_Audio_MainScript = GameObject.Find("Main Camera").GetComponent <Audio_MainScript>(); player = GameObject.Find("Player").GetComponent <Transform>(); boxC = GetComponent <BoxCollider2D>(); script_Platformer2DUserControl = GameObject.Find("Player").GetComponent <Platformer2DUserControl>(); player_canvas = GameObject.Find("CanvasPlayerDialogo").GetComponent <Canvas>(); if (gameObject.name != "_NPCs_(SALADEAULA)_1") { if (gameObject.name != "_NPCs_(SALADEAULA)_2") { if (gameObject.name != "_NPCs_(SALADEAULA)_3") { //img_efeito_minigame = GameObject.Find("img_efeitoMiniGame").GetComponent<Image>(); } } } script_pensamentoController = GameObject.Find("PensamentoController").GetComponent <PensamentoController>(); //Alterações Danilo if (SceneManager.GetActiveScene().name == "Dia_1") { if (GameObject.Find("Teleporte(sala<->escola)") != null) { script_Teleporte = GameObject.Find("Teleporte(sala<->escola)").GetComponent <Teleporte>(); } } //CacaPalavras = GameObject.Find("_Caça-Palavras"); //CacaPalavras2 = GameObject.Find("_Caça-Palavras2"); }
// Start is called before the first frame update void Start() { boss1Animator = GetComponent <Animator>(); _GameController = FindObjectOfType(typeof(GameController)) as GameController; _GameControllerTeleporte = FindObjectOfType(typeof(Teleporte)) as Teleporte; alvo = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); boss1_local = this.GetComponent <Transform>(); StartCoroutine("mexeChefe"); StartCoroutine("girachefe"); }
private void Awake() { Letras = GetComponentsInChildren <Text>(); script_random_Char = GetComponentsInChildren <random_Char>(); script_Audio_MainScript = GameObject.Find("Main Camera").GetComponent <Audio_MainScript>(); thisCanvas = GetComponentInParent <Canvas>(); mainCamera = GameObject.Find("Main Camera").GetComponent <Camera>(); toParent = GameObject.Find("toParent"); //img_efeito_minigame = GameObject.Find("img_efeitoMiniGame").GetComponent<Image>(); script_Platformer2DUserControl = GameObject.Find("Player").GetComponent <Platformer2DUserControl>(); if (SceneManager.GetActiveScene().name == "Dia_1") { teleportePescola = GameObject.Find("Teleporte(acabandoPuzzle)").GetComponent <Teleporte>(); } //teleporteEscola = GameObject.Find("Teleporte(Escola<->Sala)"); }
// Start is called before the first frame update void Start() { PassouFase.passou = false; _GameController = FindObjectOfType(typeof(GameController)) as GameController; _GameControllerTeleporte = FindObjectOfType(typeof(Teleporte)) as Teleporte; if (ProximaFase == 6) { minimoMoedas = 30; minimoItens = 2; } else if (ProximaFase == 7) { minimoMoedas = 30; minimoItens = 2; } else if (ProximaFase == 8) { minimoMoedas = 30; minimoItens = 2; } else if (ProximaFase == 10) { minimoMoedas = 30; minimoItens = 2; } else if (ProximaFase == 11) { minimoMoedas = 30; minimoItens = 2; } else if (ProximaFase == 12) { minimoMoedas = 30; minimoItens = 2; } else if (ProximaFase == 13) { minimoMoedas = 30; minimoItens = 2; } else if (ProximaFase == 16) { minimoMoedas = 30; minimoItens = 3; } }
// Start is called before the first frame update void Start() { groundLayer = LayerMask.GetMask("Default"); PlayerRb = GetComponent <Rigidbody2D>(); PlayerAnimator = GetComponent <Animator>(); PlayerSr = GetComponent <SpriteRenderer>(); _GameControllerTeleporte = FindObjectOfType(typeof(Teleporte)) as Teleporte; _GameController = FindObjectOfType(typeof(GameController)) as GameController; _GameController.playerTransform = this.transform; itens = 0; gravidadeInicial = PlayerRb.gravityScale; ganhouPulo = false; forcaPulo = 320; if (PassaValores.hp != 0) { maxHp = PassaValores.hp; } moedas = PassaValores.moedas; if (PassaValores.cor_mapa == 2) { int i = 0; foreach (string tipo in EscolhaFase1_2.lista_tag) { foreach (GameObject gameObj in GameObject.FindGameObjectsWithTag(EscolhaFase1_2.lista_tag[i])) { gameObj.GetComponent <Renderer>().material.color = new Color(+.79f, +.79f, +.79f, .9f); } i++; } } else if (PassaValores.cor_mapa == 1) { int i = 0; foreach (string tipo in EscolhaFase1_2.lista_tag) { foreach (GameObject gameObj in GameObject.FindGameObjectsWithTag(EscolhaFase1_2.lista_tag[i])) { gameObj.GetComponent <Renderer>().material.color = new Color(+1.1f, +1.1f, +1.1f, 1f); } i++; } } }
private void OnTriggerEnter2D(Collider2D collision) { if (SceneManager.GetActiveScene().name == "Dia_4") { if (collision.gameObject.name == finalizarDEMO.name) { SceneManager.LoadScene(6); } } if (collision.gameObject.CompareTag("NPC1")) { scriptNPC1_MainScript = collision.GetComponent <NPC1_MainScript>(); entrouNPC = true; } if (collision.gameObject.CompareTag("Interativo")) { scriptInterativos = collision.GetComponent <Interativos>(); entrouInterativo = true; } if (collision.gameObject.CompareTag("DPT")) { script_Controller_DialoguePerTime = collision.GetComponent <Controller_DialoguePerTime>(); entrouDPT = true; } if (collision.gameObject.CompareTag("AsD")) { script_Controller_Assorted_Dialogues = collision.GetComponent <Controller_Assorted_Dialogues>(); entrouAsD = true; } if (collision.gameObject.CompareTag("Teleporte")) { scriptTeleporte = collision.GetComponent <Teleporte>(); entrouTeleporte = true; } }
// Start is called before the first frame update void Start() { texto = GetComponent <Text>(); _GameControllerTeleporte = FindObjectOfType(typeof(Teleporte)) as Teleporte; }
// Start is called before the first frame update void Start() { _GameControllerTeleporte = FindObjectOfType(typeof(Teleporte)) as Teleporte; }