커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
답주신대로 해봤는데..
undefined주차
북마크
김*원
댓글
5
추천
0
조회수
19
조회수
19
답변 완료

질문이 많아서 죄송한데여

스파르타 즉문즉답

자꾸 막히니까 포기하고싶네요;;

using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class rtan : MonoBehaviour
{
    float direction = 0.05f;


    // Start is called before the first frame update
    void Start()
    {


    }


    // Update is called once per frame
    void Update()
    {
        if (transform.position.x > 2.8f)
        {
            direction = -0.05f;
        }
        if (transform.position.x < 2.8f)
        { 
              direction = 0.05f;
    }
            transform.position += new Vector3(direction, 0, 0);
    }
}
취소
 공유
취소
댓글 0
댓글 알림
나의얼굴