노래찍기 기능추가 및 박스 파괴가 아니라 베이도록 수정
This commit is contained in:
@@ -7,13 +7,6 @@ public class Spawner : MonoBehaviour
|
||||
public float beat = 1;
|
||||
float timer = 0f;
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if(timer > beat)
|
||||
@@ -21,10 +14,14 @@ public class Spawner : MonoBehaviour
|
||||
int c = Random.Range(0, 2);
|
||||
int p = Random.Range(0, 4);
|
||||
|
||||
GameObject obj = Instantiate(cube[c], point[p]); //beatBox를 랜덤하게 생성
|
||||
|
||||
obj.transform.localPosition = Vector3.zero; //박스의 벡터(방향을 초기화)
|
||||
obj.transform.Rotate(transform.forward, 90 * Random.Range(0, 4)); //박스의 회전(방향, 회전률)
|
||||
GameObject obj = Instantiate(cube[c], point[p].position, point[p].rotation);
|
||||
//GameObject obj = Instantiate(cube[c], point[p]); //beatBox를 랜덤하게 생성
|
||||
|
||||
obj.transform.Rotate(transform.forward, 90 * Random.Range(0, 4));
|
||||
|
||||
//obj.transform.localPosition = Vector3.zero; //박스의 벡터(방향을 초기화)
|
||||
//obj.transform.Rotate(transform.forward, 90 * Random.Range(0, 4)); //박스의 회전(방향, 회전률)
|
||||
|
||||
|
||||
timer -= beat;
|
||||
|
||||
Reference in New Issue
Block a user