Initial Unity project
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
// 게임 오브젝트를 계속 왼쪽으로 움직이는 스크립트
|
||||
public class ScrollingObject : MonoBehaviour {
|
||||
public float speed = 10f; // 이동 속도
|
||||
|
||||
private void Update() {
|
||||
// 게임 오브젝트를 왼쪽으로 일정 속도로 평행 이동하는 처리
|
||||
if(!GameManager.instance.isGameover)
|
||||
{
|
||||
transform.Translate(Vector3.left * speed * Time.deltaTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user