Example #1
0
    public AICharacter GetBulletAt(Vector3 pos, Quaternion rot)
    {
        if (objects.Count > 0)
        {
            AICharacter obj = objects[Random.Range(0, objects.Count)];
            obj.Agent.Warp(pos);
            objects.Remove(objects[objects.Count - 1]);
            obj.gameObject.SetActive(true);
            obj.Reset();


            return(obj);
        }
        else
        {
            objects.Add(RequireT());
            return(GetBulletAt(pos, rot));
        }
    }