<div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;">안녕하세요. 벽돌깨기 게임 소스 코드를 보다 이해 안되는 부분이 있어서 질문 글 올립니다.. ㅠㅠ</div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;"><br></div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;">아래 이미지의 소스 코드는 Player(조종하는 막대기)를 좌우로 움직이는 기능을 구현한 코드인 것 같은데</div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;"><br></div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;"> <div style="font-family:inherit;font-size:inherit;list-style:none;margin:0px;padding:0px;">이 코드 중, position.x += delta.x / 55.0f; 가 뭔지 이해가 잘 안됩니다.</div> <div style="font-family:inherit;font-size:inherit;list-style:none;margin:0px;padding:0px;"><br></div> <div style="font-family:inherit;font-size:inherit;list-style:none;margin:0px;padding:0px;">그러니까 Input.mousePosition - dragStartPos 의 값을 대입받은 delta.x 를 왜 / 55.0f 해주는 것인지 잘 모르겠습니다.</div> <div style="font-family:inherit;font-size:inherit;list-style:none;margin:0px;padding:0px;"><br></div> <div style="font-family:inherit;font-size:inherit;list-style:none;margin:0px;padding:0px;">/ 55.0f 를 지우고 실행 해보니 마우스가 움직인 1픽셀 마다 x의 값이 1씩 증가하거나 뺴지는 듯 하는데,<span style="font-size:9pt;line-height:1.5;"> </span></div> <div style="font-family:inherit;font-size:inherit;list-style:none;margin:0px;padding:0px;"><span style="font-size:9pt;line-height:1.5;"><br></span></div> <div style="font-family:inherit;font-size:inherit;list-style:none;margin:0px;padding:0px;"><span style="font-size:9pt;line-height:1.5;">제 뇌피셜이라 </span><span style="font-size:9pt;line-height:1.5;">맞는 생각이라 생각되진 않았습니다. ㅠㅠ..</span></div></div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;"><br></div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;">그리고 코드의 맨 마지막 줄의 transform.position = position; 이 코드는 transform.position에 마지막으로 변화된 position.x의 값을 대입 시켜주는 것인가요?</div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;"><br></div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;">지식이 부족해 이렇게 질문드려 죄송합니다.</div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;"><br></div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;"><br></div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;"><br></div> <div style="font-family:'돋움', dotum, Helvetica, sans-serif;list-style:none;margin:0px;padding:0px;line-height:16.8px;"><img src="" style="border:none;width:418px;height:650px;" alt=""><br><img src="" style="border:none;width:548px;height:406px;" alt=""></div>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.