Answers for "spawner unity 2d"

C#
0

spawner unity 2d

using UnityEngine;

public class Spawner : MonoBehaviour
{
	public GameObject Object;
	float timebtwspawn;
	public float startTimeBtwSpawn;
    void Update()
    {
			if (timebtwspawn <= 0)
			{
				Instantiate(Object, transform.position, Quaternion.identity);
			}
			else
			{
				timebtwspawn -= Time.deltaTime;
			}
		}
	}
Posted by: Guest on September-14-2020

C# Answers by Framework

Browse Popular Code Answers by Language