커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
코드 쓰는 게 무척 헷갈리는군요-
undefined주차
북마크
김*영
댓글
1
추천
0
조회수
5
조회수
5
답변 완료

  void Start()

  {

    if (Input.GetMouseButtonDown(0))

    {

      toword *= -1;

      direction *= -1;


    void update()

      {

        if (Input.GetMouseButtonDown(0))

        {

          toword *= -1;

          direction *= -1;

        }

        if (transform.position.x < 2.8f)

        {

          direction = -0.05f;

          toword = -1.0f;

        }

        if (transform.position.x < -2.8f)

     

        {

          direction = 0.05f;

          toword = 1.0f;

    }

    transform.localScale = new Vector3(toword, 1, 1);

    transform.position += new Vector3(direction, 0, 0);

   } 



스파르타 즉문즉답

맨 밑에 빨간 줄이 왜 생기는지 모르겠네요, 어느 부분에서 오류가 난 건지 보이질 않네요-

취소
 공유
취소
댓글 0
댓글 알림
나의얼굴