public void AddMarker(Coordinate coords) { StartMarker marker = Instantiate(markerPrefab, transform, true); marker.Init(coords); marker.UpdatePosition(map, mapCamera.transform.rotation); markers.Add(marker); }
void Start() { initialPosition = transform.position; initialRotation = transform.rotation; startMarker = Instantiate(carStartPrefab, transform.position, Quaternion.identity).GetComponent <StartMarker>(); startMarker.transform.Rotate(new Vector3(90f, 0, 0)); startMarker.Init(this, color); trail = Instantiate(trailPrefab, Vector3.zero, Quaternion.identity).GetComponent <Trail>(); trail.Init(this, plane, linkedParking); }