mirror of
https://github.com/ConjureETS/PixelSphinx.git
synced 2026-03-24 02:20:58 +00:00
26 lines
474 B
C#
26 lines
474 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class SpawnAsteroids : MonoBehaviour {
|
|
|
|
public GameObject myAsteroid;
|
|
public Vector3 initialPosition;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
InvokeRepeating("Spawn", 0, 0.5F);
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
|
|
}
|
|
|
|
void Spawn()
|
|
{
|
|
GameObject instance = Instantiate(myAsteroid);
|
|
instance.transform.position = new Vector3(10, 10, 0);
|
|
}
|
|
}
|