Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Squads : MonoBehaviour
- {
- public string squadName;
- public int numberOfSquads;
- public int membersPerSquad;
- public bool randomMembersInSquads = false;
- private int countMembers = 0;
- public void StartInit()
- {
- var members = GameObject.FindGameObjectsWithTag("Agent");
- if (numberOfSquads <= members.Length)
- {
- for (int i = 0; i < numberOfSquads; i++)
- {
- countMembers++;
- if (countMembers == (numberOfSquads / membersPerSquad))
- {
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment