i have Enemy Vehicles more than a hundred.
They must be loaded scene by Level and Wave.
Each Vehicle has different point, if an enemy cross line it will hit me that point.
i tried to create a class but it didnt work.
i dont know how to call them with order and use properties
using UnityEngine;
public class EnemyVehicles : MonoBehaviour
{
public class Vehicles
{
public GameObject V;
public float point;
public Vehicles(GameObject go, float p)
{
V = go;
point = p;
}
}
private Vehicles[] Ve;
public GameObject[] go;
public float[] p;
void Start()
{
for (int i = 0; i < go.Length; i++)
{
Ve_.V = go*; //it doesnt work*_
Ve_.point = p*;
}
Debug.Log(Ve[0].V.transform.name + Ve[0].point);
}
public GameObject GetVehicle(int i)
{_
_return Ve.V;
}
}*_