using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class LandMarkGenerater : MonoBehaviour {
|
|
|
|
public Transform[] LandMarkLocations;
|
|
|
|
|
|
public void AddHotSpots(GameObject[] hotSpots)
|
|
{
|
|
foreach(Transform location in LandMarkLocations)
|
|
{
|
|
int randIndex = Random.Range(0, hotSpots.Length);
|
|
float RandomRotation = Random.Range(0, 3) * 90;
|
|
|
|
GameObject temp = Instantiate(hotSpots[randIndex], transform);
|
|
temp.transform.position = location.position;
|
|
temp.transform.Rotate(Vector3.up, RandomRotation);
|
|
temp.name = "LandMark";
|
|
}
|
|
}
|
|
}
|