示例#1
0
 void Update()
 {
     if (Mouse.current.leftButton.isPressed)
     {
         // fire
         equippedGun.Fire(settings.RaycastFunctions.FromCameraToMouseRaycast(gameObject, equippedGun.WhatIsTarget, out GameObject hit));
     }
     if (Keyboard.current.qKey.wasPressedThisFrame)
     {
         // turn indicator on/off
         equippedGun.InvertIndicatorState();
     }
 }