// Use this for initialization void Start() { // InicializaƧao do Controle do Personagem controller = GetComponent<CharacterController> (); passos = GetComponent<Passos> (); mira = GameObject.Find ("Mira").GetComponent<Mira> (); }
void Start() { CorpoInimigo = GetComponent <Rigidbody> (); SomTiro = GetComponent <AudioSource> (); miraScript = Mira.GetComponent <Mira> (); CorpoInimigo.velocity = transform.forward * Velocidade; AlturaMinima = -10.44f; AlturaMaxima = 10.44f; frequenciaTiro = (Random.Range(60, 100)) / 100.0f; }
private void OnTriggerExit2D(Collider2D outro) { if (outro.gameObject.tag == "MiraPlayer01") { outro.GetComponent <SpriteRenderer>().color = Color.white; Mira p = outro.GetComponent <Mira>(); p.velocidade = 3.5f; StopCoroutine("Delay"); colidiu = false; } }
// Start is called before the first frame update void Start() { cm = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>(); cm2 = GameObject.FindGameObjectWithTag("MainCamera2").GetComponent <Camera>(); miraP01 = GameObject.FindGameObjectWithTag("MiraPlayer01").GetComponent <Mira>(); miraP02 = GameObject.FindGameObjectWithTag("MiraPlayer02").GetComponent <Mira2>(); player = GameObject.FindGameObjectWithTag("Player01"); player2 = GameObject.FindGameObjectWithTag("Player02"); playerScript = GameObject.FindGameObjectWithTag("Player01").GetComponent <Player>(); playerScript2 = GameObject.FindGameObjectWithTag("Player02").GetComponent <Player2>(); }
// Start is called before the first frame update void Start() { canvas.SetActive(false); player01 = GameObject.FindGameObjectWithTag("Player01").GetComponent <Player>(); miraPlayer01 = GameObject.FindGameObjectWithTag("MiraPlayer01").GetComponent <Mira>(); camera1 = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>(); player02 = GameObject.FindGameObjectWithTag("Player02").GetComponent <Player2>(); miraPlayer02 = GameObject.FindGameObjectWithTag("MiraPlayer02").GetComponent <Mira2>(); camera2 = GameObject.FindGameObjectWithTag("MainCamera2").GetComponent <Camera>(); }
private void OnTriggerEnter2D(Collider2D outro) { if (outro.gameObject.tag == "MiraPlayer01") { outro.GetComponent <SpriteRenderer>().color = Color.green; outro.transform.position = transform.position; Mira p = outro.GetComponent <Mira>(); p.velocidade = 1.5f; StartCoroutine("Delay"); colidiu = true; } }
// Use this for initialization void Start() { // Ocultar Cursor do Mouse Cursor.visible = false; Cursor.lockState = CursorLockMode.Confined; // InicializaƧao da variavel de Movimento move = GetComponent<Movimento> (); olhar = GetComponent<Olhar> (); acoes = GetComponent<Acoes> (); mira = GameObject.Find ("Mira").GetComponent<Mira> (); travarOlhar = false; travarMovimento = false; travarAcoes = false; }
// Use this for initialization void Start() { player = GameObject.Find("Player"); mira = GameObject.FindWithTag("Mira").GetComponent<Mira>(); }
void Start() { olhar = GameObject.FindWithTag("MainCamera"); mira = GameObject.Find("Mira"); alvo = mira.GetComponent<Mira> (); }