(1)BGLoop
Unity/수업내용 2019. 5. 1. 19:031 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | using System.Collections; using System.Collections.Generic; using UnityEngine; public class TestBGScrorer : MonoBehaviour { public Transform[] arrGround; public float speed = 2f; private void Update() { for(int i = 0; i<this.arrGround.Length;i++) { this.arrGround[i].Translate(new Vector3(0, -0.1f, 0) * this.speed); if(this.arrGround[i].transform.localPosition.z<=-29.5f) { this.arrGround[i].transform.localPosition = new Vector3(0, 0, 59f); } } } } | cs |
'Unity > 수업내용' 카테고리의 다른 글
(3,4)ShootAndObjectPooling (0) | 2019.05.01 |
---|---|
(2)MoveAnd//한번 더 확인 (0) | 2019.05.01 |
LayerMask (0) | 2019.05.01 |
자습서1(WASD이동, 마우스 포인트 Look, 라인렌더링 (0) | 2019.04.30 |
<캐릭터 조작>화면 터치, WASD, 조이스틱 (0) | 2019.04.25 |