using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class OilRigSpawnGen : MonoBehaviour {
//public List units = new List();
public GameObject waterTiles;
void Update()
{
if (Input.GetKeyDown(KeyCode.G))
{
for (int x = 0; x < 3; x++)
{
for (int z = 0; z < 3; z++)
{
this.gameObject.transform.position = new Vector3(gameObject.transform.position.x,0, gameObject.transform.position.z);
GameObject tileClone = Instantiate(waterTiles.gameObject, new Vector3(transform.position.x - (55 * x), 0, transform.position.z - (55 * z)), Quaternion.identity) as GameObject;
//units.Add(tileClone.gameObject);
}
}
}
}
}
↧