Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. class Weapons : MonoBehaviour
  2. {
  3.  
  4. float[] Firingcaclulator = new float[15] { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 };
  5. Quaternion EmptyRotation = new Quaternion();
  6.  
  7. public void Lasers(Vector3 PositionofShooter, GameObject LaserGameObject, int LevelofWeapon)
  8. {
  9. Debug.Log("Lasers Initiated");
  10. if (Firingcaclulator[0] >= 10)
  11. {
  12. Instantiate(LaserGameObject, PositionofShooter, EmptyRotation);
  13. Firingcaclulator[0] = 0;
  14. }
  15. Firingcaclulator[0] += ((5 + 1 * 5) * Time.deltaTime);
  16.  
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement