Exemple #1
0
 // Update is called once per frame
 void Update()
 {
     if (arma != null && arma.podeAtacar)
     {
         arma.atacar(true);
     }
 }
Exemple #2
0
    void tratarTiro()
    {
        //bool tiro = Input.GetButtonDown ("Fire1");
        //tiro |= Input.GetButtonDown ("Fire2");

        if (ControllerScript.isFire)
        {
            ArmaScript arma = GetComponent <ArmaScript>();

            if (arma != null)
            {
                // false pois nao sou o inimigo
                arma.atacar(false);
            }
        }
    }