Guest User

Untitled

a guest
Mar 21st, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Squads : MonoBehaviour
  6. {
  7. public string squadName;
  8. public int numberOfSquads;
  9. public int membersPerSquad;
  10. public bool randomMembersInSquads = false;
  11.  
  12. private int countMembers = 0;
  13.  
  14. public void StartInit()
  15. {
  16. var members = GameObject.FindGameObjectsWithTag("Agent");
  17.  
  18. if (numberOfSquads <= members.Length)
  19. {
  20. for (int i = 0; i < numberOfSquads; i++)
  21. {
  22. countMembers++;
  23.  
  24. if (countMembers == (numberOfSquads / membersPerSquad))
  25. {
  26.  
  27. }
  28. }
  29. }
  30. }
  31. }
Add Comment
Please, Sign In to add comment