Advertisement
Guest User

RandomEnemyV2Extension

a guest
Feb 24th, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. namespace RandomEnemyV2ArrayExt
  6. {
  7. public static class RandomEnemyV2ArrayExt
  8. {
  9. public static T GetRandom<T>(this T[] array)
  10. {
  11. return array[Random.Range(0, array.Length)];
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement