Advertisement
SizilStank

Untitled

Sep 21st, 2022
785
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | Gaming | 0 0
  1. void shoot()
  2.     {
  3.         Vector3 _offset = new Vector3(-0.005f, -0.7f, -6.6f);
  4.  
  5.         var input = Input.inputString;
  6.         switch (input)
  7.         {
  8.             case "1":
  9.                 Input.GetMouseButtonDown(1);
  10.                     break;
  11.             case "2":
  12.                 Input.GetMouseButtonDown(2);
  13.                 break;
  14.             default:
  15.                 Instantiate(_laserPrefab, transform.position + _offset, _laserPrefab.transform.localRotation);
  16.                 break;
  17.         }
  18.  
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement