Пример #1
0
 // Update is called once per frame
 void Update()
 {
     if (FireAction.GetStateDown(handType))
     {
         Debug.Log("Fire Button Pressed from controller");
         gun.Fire();
     }
     if (Input.GetKeyDown("space"))
     {
         Debug.Log("Fire Button Pressed from spacebar");
         gun.Fire();
     }
 }
Пример #2
0
        protected virtual void Attack()
        {
            gun.Fire();

            if (OnAttack != null)
            {
                OnAttack();
            }
        }