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

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

        timer -= Time.deltaTime;
    }