https://learn.unity.com/tutorial/lesson-5-1-clicky-mouse-1?uv=6&missionId=5f7648a4edbc2a5578eb67df&pathwayId=5f7e17e1edbc2a5ec21a20af&contentId=5f7649a0edbc2a2315d471f7&projectId=5cf96bdeedbc2a2b475972b3



Lesson 5.1 - Clicky Mouse - Unity Learn

Overview: Itโ€™s time for the final unit! We will start off by creating a new project and importing the starter files, then switching the gameโ€™s view to 2D. Next we will make a list of target objects for the player to click on: Three โ€œgoodโ€ objects and one โ€œbadโ€. The targets will launch spinning into the air after spawning at a random position at the bottom of the map. Lastly, we will allow the player to destroy them with a click! Project Outcome: A list of three good target objects and one bad target object will spawn in a random position at the bottom of the screen, thrusting themselves into the air with random force and torque. These targets will be destroyed when the player clicks on them or they fall out of bounds.

learn.unity.com



์œ„ ์œ ๋‹ˆํ‹ฐ ํŠœํ† ๋ฆฌ์–ผ ๋ณด๋ฉด์„œ ๋”ฐ๋ผํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.


ํŠœํ† ๋ฆฌ์–ผ ์˜์ƒ์—์„œ๋Š” isTrigger๊ฐ€ false ์ผ๋•Œ๋„ ์ •์ƒ์ ์œผ๋กœ ์ง„ํ–‰์ด ๋˜๋Š”๊ฒƒ์„ ํ™•์ธ ๊ฐ€๋Šฅํ•œ๋ฐ์š” (5.7 ์˜์ƒ ์ดˆ๋ฐ˜๋ถ€)

์ œ๊ฐ€ ๋”ฐ๋ผํ–ˆ์„๋•Œ isTrigger๋ฅผ false๋กœ ํ•˜๋ฉด, ํšŒ์ „์ด ๋” ๊ฐ•ํ•˜๊ฒŒ ๋“ค์–ด๊ฐ€๋Š”๊ฒƒ์œผ๋กœ ๋ณด์ด๋Š”๋ฐ, ํ˜น์‹œ ๋‹ค๋ฅธ ์›์ธ์ด ์žˆ๊ฑฐ๋‚˜ ์ œ๊ฐ€ ์ž˜๋ชป ๋”ฐ๋ผํ•œ๊ฒŒ ์žˆ๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค



์ฐธ๊ณ  ์ด๋ฏธ์ง€๋“ค)


1. isTrigger = false ์ผ๋•Œย  -> ํšŒ์ „์ด ์—„์ฒญ๋‚˜๊ฒŒ ๋น ๋ฆ„ย 

05b2de23fcd139ab2eed86e7439c746c80214f9b44d2223f48a5392d066258ccacbdc1ca5bd4e4bb6ae223b1



2. isTrigger = true์ผ๋•Œ -> ์ ๋‹นํ•œ ํšŒ์ „(์ด์ •๋„๊ฐ€ ์˜๋„ํ•œ ํšŒ์ „๋ ฅ์ž…๋‹ˆ๋‹ค)

05b2de23fcd139ab2eed86e7439c746c80214f9b44d2223f4ba53b2e066258cce1a2fd66210e3836e0e00850




๊ฐ๊ฐ GameManager.cs ์™€ Target.cs ์ฝ”๋“œ ์ž…๋‹ˆ๋‹คย 

0abcdd23c8d336a769bac4fb06df231d4189c19f2d3546f9eab2


19bcc221e0c676b660b8f68b12d21a1de77dc76e5c