Exemplo n.º 1
0
 void Update()
 {
     if (DialControl.GetButtonDown())
     {
         audioSource.PlayOneShot(pew, 0.7F);
         GameObject.Instantiate(bullet, this.transform.position, Quaternion.identity, null);
     }
 }
Exemplo n.º 2
0
    void Update()
    {
        if (DialControl.GetButtonDown())
        {
            sr.sprite = shot;
            timer     = animTime;
        }

        if (timer < 0)
        {
            sr.sprite = normal;
        }

        timer -= Time.deltaTime;
    }