Example #1
0
 // Use this for initialization
 void Start()
 {
     // InicializaƧao do Controle do Personagem
     controller = GetComponent<CharacterController> ();
     passos = GetComponent<Passos> ();
     mira = GameObject.Find ("Mira").GetComponent<Mira> ();
 }
Example #2
0
 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;
 }
Example #3
0
 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;
     }
 }
Example #4
0
 // 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>();
    }
Example #6
0
 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;
     }
 }
Example #7
0
    // 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;
    }
Example #8
0
 // Use this for initialization
 void Start()
 {
     player = GameObject.Find("Player");
     mira = GameObject.FindWithTag("Mira").GetComponent<Mira>();
 }
Example #9
0
 void Start()
 {
     olhar = GameObject.FindWithTag("MainCamera");
     mira = GameObject.Find("Mira");
     alvo = mira.GetComponent<Mira> ();
 }