init
This commit is contained in:
commit
9afd57306d
323 changed files with 204673 additions and 0 deletions
25
Assets/Scripts/Game14/Game14Spawner.cs
Normal file
25
Assets/Scripts/Game14/Game14Spawner.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Game14Spawner : MonoBehaviour{
|
||||
|
||||
public float spawnRate = 1f;
|
||||
|
||||
public GameObject hexagon;
|
||||
|
||||
float nextTimeToSpawn = 0f;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start(){
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update(){
|
||||
if(Time.time >= nextTimeToSpawn){
|
||||
Instantiate(hexagon, Vector3.zero, Quaternion.identity);
|
||||
nextTimeToSpawn = Time.time + 1f / spawnRate;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue