2026-06-05 11:26:57 +09:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
// 게임 오브젝트를 계속 왼쪽으로 움직이는 스크립트
|
|
|
|
|
public class ScrollingObject : MonoBehaviour {
|
|
|
|
|
public float speed = 10f; // 이동 속도
|
|
|
|
|
|
|
|
|
|
private void Update() {
|
|
|
|
|
// 게임 오브젝트를 왼쪽으로 일정 속도로 평행 이동하는 처리
|
|
|
|
|
if(!GameManager.instance.isGameover)
|
|
|
|
|
{
|
2026-06-17 09:44:38 +09:00
|
|
|
transform.Translate(Vector3.left * speed * GameManager.instance.gameSpeed * Time.deltaTime);
|
2026-06-05 11:26:57 +09:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|