powerfun-unity/Assets/PlayerFactory.cs
2021-03-23 16:07:31 +08:00

27 lines
614 B
C#

using Mapbox.Directions;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Assets.Scenes.Ride.Scripts
{
public class PlayerFactory : MonoBehaviour
{
[SerializeField]
public GameObject _playerPrefab;
// Start is called before the first frame update
void Start()
{
if (_playerPrefab != null)
{
for (int i = 0; i < 100; i++)
{
Instantiate(_playerPrefab, new Vector3(i, 1, 0), Quaternion.identity);
}
}
}
}
}