using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PositionHolderScript : MonoBehaviour {
    public GameObject AA;
    public GameObject AB;
    public GameObject BA;
    public int xdiv;
    public int ydiv;

    public Vector3 GetRandomPosition() {
        //return places[Random.Range(0, places.Count)].transform.position;
        return Vector3.zero;
    }

    public Vector3 GetRandomPositionOnce() {
        /*int r = Random.Range(0, places.Count);
        Vector3 po = places[r].transform.position;
        places.RemoveAt(r);
        re+turn po;*/
        Vector3 xdi = BA.transform.position - AA.transform.position;
        Vector3 ydi = AB.transform.position - AA.transform.position;
        Vector3 offs = Random.Range(0,xdiv+1) * xdi / (xdiv + 1)+
            Random.Range(0, ydiv + 1) * ydi / (ydiv + 1);
        return AA.transform.position + offs;
    }
}
