• Daum
  • |
  • 카페
  • |
  • 테이블
  • |
  • 메일
  • |
  • 카페앱 설치
 
카페 프로필 이미지
텐인텐[10년 10억 만들기]
 
 
 
카페 게시글
검색이 허용된 게시물입니다.
맞벌이 부부의삶 코딩 프로그램 에러 수정 봐주실분 계실까요? (너무 급)
비온다 눈온다 추천 0 조회 487 24.06.20 07:34 댓글 5
게시글 본문내용
 
다음검색
댓글
  • 24.06.20 08:28

    첫댓글 잘은 모르지만..
    네번째줄
    ground .scale = 2; 이줄은 ground.scale = 2; 스페이스 붙이시고

    if (keyDown("down")) {
    bear.y = bear + x_velocity_of_bear;
    }

    여기는

    if (keyDown("down")) {
    bear.y = bear.y + x_velocity_of_bear;
    }

    같네요..

  • 24.06.20 08:28

    네째줄 ground 뒤에 공백?

  • 24.06.20 09:24

    Your code has a few issues that need to be corrected. Below are the identified issues along with their fixes:

    1.Bear's Downward Movement: The down arrow key logic should update the bear.y property correctly.
    2.Random Generation of Carrot, Banana, and Bug: The bug function needs to be called in the draw function.
    3.Collision Detection: Collision detection needs to be improved to actually detect the collisions with created objects (carrot, banana, bug).
    4.Variable Declaration Scope: score and health should be declared outside of the draw function to retain their values across frames.

  • 24.06.20 09:25

    5.Duplicate drawSprites() Call: drawSprites() is called twice, it should only be called once.
    6.Creating and Removing Sprites: There should be a mechanism to remove off-screen sprites and maintain a list of current food items and bugs for collision detection.

    챗gtp 돌리니 이렇게 답 주네요. 코딩할 때 챗gtp 아주 유용하다고하니 한번 챗gtp 이용해보세요. 수정된 코드까지 알려줬는데 답글에 올릴 수가 없어서 메세지만 올렸습니다.

  • 작성자 24.06.20 16:54

    @뽀롱이~ 고맙습니다~~

최신목록