ºÇ½ª¹¹¿·¡§
orika_ex_miyako 2021ǯ01·î30Æü(ÅÚ) 00:16:20ÍúÎò
¡ã¼ÂÁõÆ°²è¡¡¡¥²¡¼¥à¤ò¼Â¹Ô¤¹¤ë¤È GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬Æ©ÌÀ¤Ë¤Ê¤Ã¤Æ¸«¤¨¤Ê¤¯¤Ê¤ë¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡ã¼ÂÁõÆ°²è¢¡¡¥Ü¥¹¤òÅݤ¹¤È GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬Æ©ÌÀ¤Ç¤Ï¤Ê¤¯¤Ê¤ê¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤ë¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡¡°Ê²¼¤ÎÆâÍƤǽçÈ֤˼ÂÁõ¤ò¿Ê¤á¤Æ¤¤¤¤Þ¤¹¡£
¼ê½ç£²£¶¡¡¡Ý¥²¡¼¥à¥¯¥ê¥¢É½¼¨¤ÎºîÀ®¤È¼ÂÁõ¡Ý
£µ£µ¡¥CanvasÆâ¤Ë ¥²¡¼¥à¥¯¥ê¥¢É½¼¨¤ò¹Ô¤¦ GameCrearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²¤òºîÀ®¤¹¤ë £µ£¶¡¥UIManager ¥¹¥¯¥ê¥×¥È¤ÎºîÀ®¤¹¤ë¡£GameManager ¥¹¥¯¥ê¥×¥È¤È EnemyGenerator ¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¡¢¥Ü¥¹Æ¤È²ºÑ¤Î¥²¡¼¥à½ªÎ»È½Äê¤Ëȼ¤¤¡¢¥²¡¼¥à¥¯¥ê¥¢É½¼¨¤ÎÀ©¸æ½èÍý¤òÄɲ乤ë
¡¡¿·¤·¤¤³Ø½¬ÆâÍƤϡ¢°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
¡¡¡¦CanvasGroup ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Îµ¡Ç½¤Ë¤Ä¤¤¤Æ ¡¡¡¦DOTween¤ÎÊä´Öµ¡Ç½¤È¼ÂÁõÎ㣡¡¡ÝDOFade ¥á¥½¥Ã¥É¡Ý
¡¡¤³¤Î¼ê½ç¤Ç¤Ï¡¢Canvas ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈÆâ¤Ë¥²¡¼¥à¥¯¥ê¥¢¤òɽ¼¨¤¹¤ë¾ðÊó¤È¤·¤Æ¡¢¥²¡¼¥à¥¯¥ê¥¢É½¼¨ÍѤΥ²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²¤òÀ½ºî¤·¤Æ¤¤¤¤Þ¤¹¡£
¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤â¥²¡¼¥à²èÌ̤˱ǤëɬÍפΤ¢¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¤Î¤Ç¡¢ Canvas ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Æ¤¤¤¤Þ¤¹¡£
¡¡¥²¡¼¥à¥¯¥ê¥¢´ØÏ¢¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò´ÉÍý¤¹¤ë¤¿¤á¤Î¥Õ¥©¥ë¥ÀÌò¤Î GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¡¢¤½¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ³Æ²èÁü¤Îɽ¼¨ÀßÄꤹ¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²¤ò½çÈ֤˺îÀ®¤·¤Þ¤¹¡£
¡ã´°À®»þ¤Î¥Ò¥¨¥é¥ë¥¡¼²èÁü¡ä
![](https://image02.seesaawiki.jp/i/o/i-school-memo/9OV7gtBj8N.png)
¡¡Canvas ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾å¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢Create Empty ¤òÁªÂò¤·¤Þ¤¹¡£
¿·¤·¤¯¶õ¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾Á°¤ò GameClearSet ¤ËÊѹ¹¤·¤Þ¤¹¡£
GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï¡¢¥²¡¼¥à¥¯¥ê¥¢É½¼¨¤Ë´ØÏ¢¤¹¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È·²¤ò¤Þ¤È¤á¤Æ¤ª¤¯¤¿¤á¤Î¡¢¥Õ¥©¥ë¥ÀÌò¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/raVjWqcj8d.png)
¡¡GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ¡¢RectTransform ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¤«³Îǧ¤·¤Þ¤¹¡£
Canvas ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë´Þ¤Þ¤ì¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Ï Transform ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ç¤Ï¤Ê¤¯¡¢RectTransform ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ë¤è¤Ã¤Æ°ÌÃÖ¾ðÊó¤ò´ÉÍý¤·¤Æ¤¤¤Þ¤¹¡£
¤â¤·¤âÄ̾ï¤Î Transform ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢ºÆÅÙºî¤êľ¤·¤Æ¤¯¤À¤µ¤¤¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/hPKvqsjXQl.png)
Scene¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/CNLPwfEVMG.jpg)
¡¡Â³¤¤¤Æ¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀßÄê¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î°ìÈÖ²¼¤Ë¤¢¤ë Add Component ¥Ü¥¿¥ó¤ò²¡¤·¤Æ¡¢Canvas Group ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤òÄɲä·¤Þ¤¹¡£
Block Raycast ¤Î¥Á¥§¥Ã¥¯¤ò³°¤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£¤³¤Î¹àÌܤε¡Ç½¤Ë¤Ä¤¤¤Æ¤Ï¼«Ê¬¤ÇÄ´¤Ù¤Æ¤ß¤Þ¤·¤ç¤¦¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/oSzdLUqzfz.png)
¡¡°Ê¾å¤ÇÀßÄê¤Ï´°Î»¤Ç¤¹¡£
£³¡¥GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¡¢btnRestart ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤ÆÀßÄê¤ò¹Ô¤¦ ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¡¢¹ç·×£´¤Ä¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Æ¤¤¤¤Þ¤¹¡£
¡¡GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾å¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢UI => Button ¤òÁªÂò¤·¤Þ¤¹¡£
Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤È Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤¿¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¿·¤·¤¯ºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾Á°¤ò btnRestart ¤ËÊѹ¹¤·¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/GXXZ7zlp5z.png)
¡¡btnRestart ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï¥²¡¼¥à²èÌÌÁ´ÂΤòʤ¤Ã¤Æ¡¢¤É¤ÎÉôʬ¤ò¥¿¥Ã¥×¤·¤Æ¤âµ¡Ç½¤¹¤ë¥Ü¥¿¥ó¤ÎÌò³ä¤ò»ý¤Ä¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡£
¥Ü¥¿¥ó¤Îµ¡Ç½¤Ë¤Ä¤¤¤Æ¤ÏÀè¤Î¼ê½ç¤Ç¼ÂÁõ¤·¤Þ¤¹¤Î¤Ç¡¢¸½ºß¤Ï¤½¤Î¤è¤¦¤ÊÌò³ä¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¤¢¤ë¡¢¤È¤¤¤¦¤³¤È¤ò³Ð¤¨¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/NkBKE_g691.png)
Scene¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/nTPYINncPy.jpg)
¡¡Â³¤¤¤Æ¡¢btnRestart ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀßÄê¤ò¹Ô¤¤¤Þ¤¹¡££³¤Ä¤Î¼ê½ç¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢½çÈÖ¤ËÀßÄꤷ¤Æ¤¤¤¤Þ¤¹¡£
¡¡¤Þ¤º¤ÏºÇ½é¤Ë¡¢¥µ¥¤¥º¤ò²èÌÌ°ìÇÕ¡¢¤¢¤ë¤¤¤Ï¾¯¤·Â礤á¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
¤½¤Î¤è¤¦¤Ë¤·¤Æ¤ª¤¯¤³¤È¤Ç¡¢²èÌÌÁ´ÂΤ¬¥Ü¥¿¥ó¤È¤·¤Æµ¡Ç½¤¹¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
Width ¤È Height ¤ÎÃÍ¤Ï Canvas ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î Canvas Scaler ¤ËÀßÄꤷ¤¿ÃͤÈƱ¤¸¤Ë¤¹¤ë¤³¤È¤Ç Canvas ¤ÈƱ¤¸¥µ¥¤¥º¤Ë¤Ê¤ê¤Þ¤¹¡£
Width ¤Ê¤É¤ÎÃͤòÊѹ¹¤·¤Æ¤â¤è¤¤¤Ç¤¹¤·¡¢Scene¥Ó¥å¡¼¤ÇÁàºî¤·¤Æ¤â¹½¤¤¤Þ¤»¤ó¡£
¡¡£²¤Ä¤á¤Ï Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Color ¤Î¥×¥í¥Ñ¥Æ¥£¤òÁªÂò¤·¡¢Alpha ¤ÎÃͤò 0 ¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
¤³¤ì¤Ç¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬Æ©ÌÀ¤Ê¾õÂ֤ˤʤê¤Þ¤¹¡£²èÁü¤ÎÀßÄê¤ÏÉÔÍפǤ¹¡£
¡¡ºÇ¸å¤Ë Canvas Renderer ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Cull Transparent Mesh ¤Î¥Á¥§¥Ã¥¯¤òÆþ¤ì¤Æ¥ª¥ó¤Î¾õÂ֤ˤ·¤Æ¤¯¤À¤µ¤¤¡£
¤³¤Î¥¹¥¤¥Ã¥Á¤Ë¥Á¥§¥Ã¥¯¤ò¤¤¤ì¤Æ¤ª¤¯¤³¤È¤ÇÆ©ÌÀ¤Ê¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤Ä¤¤¤Æ¤ÏÉÁ²èÂоݤ«¤é³°¤µ¤ì¤ë¤³¤È¤Ë¤Ê¤ê¡¢ÉÁ²è½èÍý¤¬·Ú¤¯¤Ê¤ê¤Þ¤¹¡£
¡¡Unity ¤Ç¤ÏÈóɽ¼¨¤Î¾õÂ֤Ȥϰۤʤꡢ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬Æ©ÌÀ¤Ê¾õÂ֤ΤȤ¤Ï¡¢¡ÖÆ©ÌÀ¤Ê¾õÂ֡פȤ·¤ÆÉÁ²è¤ò¹Ô¤¦¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
¤½¤·¤ÆÄ̾ï¤ÎÉÁ²è¤è¤ê¤âÆ©ÌÀ¤Ê¾õÂÖ¤ÎÉÁ²è¤¹¤ë½èÍý¤Ï½Å¤¤½èÍý¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
¤³¤Î Cull Transparent Mesh ¤Îµ¡Ç½¤òÍøÍѤ¹¤ë¤³¤È¤Ç¡¢Éé²Ù¤ò·Ú¤¯¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£³Ð¤¨¤Æ¤ª¤¤¤Æ³èÍѤ·¤Þ¤·¤ç¤¦¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü¡
![](https://image02.seesaawiki.jp/i/o/i-school-memo/FA0f30WPqB.png)
¡¡Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ë¤Ä¤¤¤Æ¤ÏÊѹ¹¤Ï¤¢¤ê¤Þ¤»¤ó¤Î¤Ç¡¢½é´ü¾õÂ֤ΤޤޤÇÌäÂꤢ¤ê¤Þ¤»¤ó¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü¢
![](https://image02.seesaawiki.jp/i/o/i-school-memo/RzFL4cz4aR.png)
Scene¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/qR096UK2dM.jpg)
¡¡°Ê¾å¤ÇÀßÄê¤Ï´°Î»¤Ç¤¹¡£
£´¡¥GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¡¢imgGameClear ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤ÆÀßÄê¤ò¹Ô¤¦ ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾å¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢UI => Image ¤òÁªÂò¤·¤Þ¤¹¡£
Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤¿¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¿·¤·¤¯ºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾Á°¤ò imgGameClear ¤ËÊѹ¹¤·¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/7wpscivikX.png)
¡¡imgGameClear ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï¥²¡¼¥à¥¯¥ê¥¢¤Î¥í¥´¤Îɽ¼¨¤ò¹Ô¤¦¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡£
¼êË¡¤È¤·¤Æ¤Ï¡¢ "Game Clear" ¤È¤¤¤¦¥í¥´¤ò²èÁü¤È¤·¤ÆºîÀ®¤·¡¢¤½¤ì¤ò Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ËÅÐÏ¿¤·¤ÆÍøÍѤ·¤Þ¤¹¡£
¡¡¤â¤·¤â¡¢Ê¸»úÎó¤È¤·¤Æ "Game Clear" ¤Èɽ¼¨¤·¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ç¤Ï¤Ê¤¯¡¢Text ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤òÍøÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/JhPvHCyzgq.png)
Scene¥Ó¥å¡¼²èÁü(²èÌ̲¼ÉôÃæ±û¤ÎÇò¤¤²èÁü)
![](https://image01.seesaawiki.jp/i/o/i-school-memo/lIc28Pwyov.jpg)
¡¡Â³¤¤¤Æ¡¢imgGameClear ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀßÄê¤ò¹Ô¤¤¤Þ¤¹¡££³¤Ä¤Î¼ê½ç¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢½çÈÖ¤ËÀßÄꤷ¤Æ¤¤¤¤Þ¤¹¡£
¡¡ "Game Clear" ¤È¤¤¤¦Ê¸»úÎó¤ò¥í¥´²èÁü¤È¤·¤ÆºîÀ®¤·¡¢¤½¤ì¤ò Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ËÅÐÏ¿¤·¤ÆÍøÍѤ·¤Þ¤¹¡£
¡¡ÌµÎÁ¤Ç¥í¥´¤òºîÀ®¤Ç¤¤ë¥µ¥¤¥È¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤½¤Á¤é¤ò³èÍѤ·¤ÆºîÀ®¤·¤Æ¤¯¤À¤µ¤¤¡£
Google ¤Ê¤É¤Ç¡Ö¥í¥´¡¡²èÁü¡¡ÌµÎÁ¡×¤ÈÄ´¤Ù¤ë¤È¿§¡¹¤È½Ð¤Æ¤¤Þ¤¹¤Î¤Ç¡¢ÍøÍѤ·¤Æ¤ß¤Þ¤·¤ç¤¦¡£
¤½¤ÎºÝ¡¢²èÁü¥Õ¥¡¥¤¥ë¤Î³ÈÄ¥»Ò¤Ï png ¥Õ¥¡¥¤¥ë¤Ë¤·¤ÆºîÀ®¤·¤Æ¤¯¤À¤µ¤¤¡£¥í¥´²èÁü°Ê³°¤ÎÉôʬ¤¬Æ©ÌÀ¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡¤Ê¤ª¡¢¤â¤¦°ìÅÙ¡¢¥í¥´ÍѤβèÁü¤òºîÀ®¤¹¤ë¼ê½ç¤¬¤¢¤ê¤Þ¤¹¡£
¡¡²èÁü¤Ë¤¹¤ëʸ»úÎó¤Ï Game Clear ¡¢¤¢¤ë¤¤¤Ï¤½¤ì¤Ë¶á¤¤¡¢¥²¡¼¥à¥¯¥ê¥¢¤¬Ê¬¤«¤ë¥Ë¥å¥¢¥ó¥¹¤Îʸ»úÎó¤Ç¤¢¤ì¤Ð¤Ê¤ó¤Ç¤â¹½¤¤¤Þ¤»¤ó¡£
Ê¿²¾Ì¾¤Ç¤â¥«¥¿¥«¥Ê¤Ç¤â¤¤¤¤¤Ç¤¹¤·¡¢ You Win! ¤Î¤è¤¦¤Ê¤â¤Î¤Ç¤â¤è¤¤¤Ç¤¹¡£
¡¡ºîÀ®¤·¤¿²èÁü¤Ï Textures ¥Õ¥©¥ë¥À¤Ë¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ Unity ¤Ë¥¤¥ó¥Ý¡¼¥È¤·¤Æ¤¯¤À¤µ¤¤¡£
¤µ¤é¤Ë UI ¥Õ¥©¥ë¥À¤ä¡¢GameClearSet ¥Õ¥©¥ë¥À¤Ê¤É¤òÍÑ°Õ¤·¤Æ¤ª¤¯¤È¡¢´ÉÍý¤¬¤·¤ä¤¹¤¯¤Ê¤ê¤Þ¤¹¡£
¡¡Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Source Image ¥×¥í¥Ñ¥Æ¥£¤ÎÉôʬ¤Ë¥¤¥ó¥Ý¡¼¥È¤·¤¿²èÁü¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
²èÁü¤¬ÅÐÏ¿¤µ¤ì¤Æ¡¢Scene¥Ó¥å¡¼¤ÈGame¥Ó¥å¡¼¤ËÈ¿±Ç¤µ¤ì¤Þ¤¹¤Î¤Ç³Îǧ¤·¤Þ¤¹¡£
¡¡¤½¤Î¸å¡¢Raycast Target ¤Î¥¹¥¤¥Ã¥Á¤ò³°¤·¤Æ¥ª¥Õ¤Î¾õÂ֤ˤ·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Â³¤¤¤Æ¡¢²èÁü¤Î°ÌÃ֤ȥµ¥¤¥º¤òÊѹ¹¤·¤Þ¤¹¡£¤³¤ì¤Ë¤Ä¤¤¤Æ¤ÏǤ°Õ¤Ç¤¹¡£
¼«Ê¬¤¬¥æ¡¼¥¶¡¼¤ÎΩ¾ì¤Ë¤Ê¤Ã¤Æ¤ß¤Æ¡¢¸«¤ä¤¹¤¤°ÌÃ֤ȥµ¥¤¥º¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
¤Þ¤¿¡¢Àè¤Î¼ê½ç¤Ç¡¢¤â¤¦£±¤Ä¥²¡¼¥à¥ê¥¹¥¿¡¼¥ÈÍѤβèÁü¤Îɽ¼¨ÍÑ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤âºîÀ®¤·¤Þ¤¹¡£
¤½¤Î¤¿¤á¡¢¤¢¤Þ¤êÃæ±û¤ËÀßÃ֤ˤ·¤Æ¤·¤Þ¤¦¤ÈÁ´ÂΤΥХé¥ó¥¹¤¬Æñ¤·¤¯¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢¸åÄø¡¢Ä´À°¤·¤Þ¤·¤ç¤¦¡£
¡¡ºÇ¸å¤ËÁ°¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÈƱ¤¸¤è¤¦¤Ë Canvas Renderer ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î¡¢Cull Transparent Mesh ¤Î¥¹¥¤¥Ã¥Á¤ò¥ª¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/sZIcIJfvI6.png)
Scene¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/MJ5FyzvZxf.jpg)
Game¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/dLJDwCsLyu.jpg)
¡¡°Ê¾å¤ÇÀßÄê¤Ï´°Î»¤Ç¤¹¡£
£µ¡¥GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¡¢imgRestartBackground ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤ÆÀßÄê¤ò¹Ô¤¦ ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾å¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢UI => Image ¤òÁªÂò¤·¤Þ¤¹¡£
Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤¿¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¿·¤·¤¯ºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾Á°¤ò imgRestartBackground ¤ËÊѹ¹¤·¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/dv1yvr7jkg.png)
¡¡imgRestartBackground ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï¥²¡¼¥à¥ê¥¹¥¿¡¼¥È¤òÂ¥¤¹É½¼¨¤ÎÇØ·Êɽ¼¨¤ò¹Ô¤¦¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/_VEy9f0_7e.png)
Scene¥Ó¥å¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/WeQAoYUSJ3.jpg)
¡¡Â³¤¤¤Æ¡¢imgRestartBackground ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀßÄê¤ò¹Ô¤¤¤Þ¤¹¡££³¤Ä¤Î¼ê½ç¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢½çÈÖ¤ËÀßÄꤷ¤Æ¤¤¤¤Þ¤¹¡£
¡¡Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Color ¥×¥í¥Ñ¥Æ¥£¤òÁªÂò¤·¤Æ¡¢¿§¤ò¹õ(0, 0, 0)¤Ë¤·¤Æ¡¢Alpha ¤ÎÃͤò 65 Á°¸å¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
Scene¥Ó¥å¡¼¤ÈGame¥Ó¥å¡¼¤ËÈ¿±Ç¤µ¤ì¤Þ¤¹¤Î¤Ç³Îǧ¤·¤Þ¤¹¡£¤³¤Î²èÁü¤Ï¥í¥´¤ÎÇطʲèÁü¤Ê¤Î¤Ç¡¢
¤³¤Î¤è¤¦¤ËÀßÄꤹ¤ë¤È¡¢²èÌ̤Τ³¤ÎÉôʬ¤À¤±¿§¤¬ÊѤï¤ê¡¢¤³¤Î¾å¤Ëɽ¼¨¤µ¤ì¤ë²èÁü¤¬ÌÜΩ¤Ä¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡¤½¤Î¸å¡¢Raycast Target ¤Î¥¹¥¤¥Ã¥Á¤ò³°¤·¤Æ¥ª¥Õ¤Î¾õÂ֤ˤ·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Â³¤¤¤Æ¡¢²èÁü¤Î°ÌÃ֤ȥµ¥¤¥º¤òÊѹ¹¤·¤Þ¤¹¡£²£Éý(Width) ¤Ë¤Ä¤¤¤Æ¤Ï¡¢²èÌ̤κ¸±¦Ã¼¤Þ¤Ç¹¤²¤Æ¤¯¤À¤µ¤¤¡£¤Ï¤ß½Ð¤¹°Ì¤ÇÌäÂꤢ¤ê¤Þ¤»¤ó¡£
½ÄÉý(Height) ¤Ë¤Ä¤¤¤ÆǤ°Õ¤Ç¤¹¡£¤¢¤Þ¤êÂ礤¯¤Ê¤ê¤¹¤®¤Ê¤¤¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡ºÇ¸å¤ËÁ°¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÈƱ¤¸¤è¤¦¤Ë Canvas Renderer ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î¡¢Cull Transparent Mesh ¤Î¥¹¥¤¥Ã¥Á¤ò¥ª¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/0XiDln3tGZ.png)
Scene¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/FrHR2RCXK9.jpg)
Game¥Ó¥å¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/tNnKQALTZj.jpg)
¡¡°Ê¾å¤ÇÀßÄê¤Ï´°Î»¤Ç¤¹¡£
£¶¡¥GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¡¢imgRestart ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤ÆÀßÄê¤ò¹Ô¤¦ ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾å¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¡¢UI => Image ¤òÁªÂò¤·¤Þ¤¹¡£
Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤¿¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¿·¤·¤¯ºîÀ®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Ì¾Á°¤ò imgRestart ¤ËÊѹ¹¤·¤Þ¤¹¡£
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/9OV7gtBj8N.png)
¡¡imgRestart ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï¥²¡¼¥à¥ê¥¹¥¿¡¼¥È¤òÂ¥¤¹É½¼¨¤Î²èÁüÀßÄê¤ò¹Ô¤¦¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡£
¼êË¡¤È¤·¤Æ¤Ï¡¢imgGameClear ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÈƱ¤¸¤Ç¡¢ "Tap to Restart" ¤È¤¤¤¦¥í¥´¤ò²èÁü¤È¤·¤ÆºîÀ®¤·¡¢¤½¤ì¤ò Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ËÅÐÏ¿¤·¤ÆÍøÍѤ·¤Þ¤¹¡£
¤â¤·¤â¡¢Ê¸»úÎó¤È¤·¤Æ "Tap to Restart" ¤Èɽ¼¨¤·¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ç¤Ï¤Ê¤¯¡¢Text ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤òÍøÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/btwwnHe1bh.png)
Scene¥Ó¥å¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/NTE_XTM2RS.jpg)
¡¡Â³¤¤¤Æ¡¢imgRestart ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀßÄê¤ò¹Ô¤¤¤Þ¤¹¡££´¤Ä¤Î¼ê½ç¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢½çÈÖ¤ËÀßÄꤷ¤Æ¤¤¤¤Þ¤¹¡£
¡¡"Game Clear" ¤ÈƱ¤¸¤è¤¦¤Ë¡¢ "Tap to Restart" ¤È¤¤¤¦Ê¸»úÎó¤ò¥í¥´²èÁü¤È¤·¤ÆºîÀ®¤·¡¢¤½¤ì¤ò Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ËÅÐÏ¿¤·¤ÆÍøÍѤ·¤Þ¤¹¡£
¡¡²èÁü¤Ë¤¹¤ëʸ»úÎó¤Ï "Tap to Restart" ¡¢¤¢¤ë¤¤¤Ï¤½¤ì¤Ë¶á¤¤¡¢¥²¡¼¥à¤ÎºÆ¥¹¥¿¡¼¥È¤¬Ê¬¤«¤ë¥Ë¥å¥¢¥ó¥¹¤Îʸ»úÎó¤Ç¤¢¤ì¤Ð¤Ê¤ó¤Ç¤â¹½¤¤¤Þ¤»¤ó¡£
Ê¿²¾Ì¾¤Ç¤â¥«¥¿¥«¥Ê¤Ç¤â¤¤¤¤¤Ç¤¹¤·¡¢ "Retry Game" ¤Î¤è¤¦¤Ê¤â¤Î¤Ç¤â¤è¤¤¤Ç¤¹¡£
¡¡ºîÀ®¤·¤¿²èÁü¤Ï Textures ¥Õ¥©¥ë¥À¤Ë¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ Unity ¤Ë¥¤¥ó¥Ý¡¼¥È¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Image ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Source Image ¥×¥í¥Ñ¥Æ¥£¤ÎÉôʬ¤Ë¥¤¥ó¥Ý¡¼¥È¤·¤¿²èÁü¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
²èÁü¤¬ÅÐÏ¿¤µ¤ì¤Æ¡¢Scene¥Ó¥å¡¼¤ÈGame¥Ó¥å¡¼¤ËÈ¿±Ç¤µ¤ì¤Þ¤¹¤Î¤Ç³Îǧ¤·¤Þ¤¹¡£
¡¡¤½¤Î¸å¡¢Raycast Target ¤Î¥¹¥¤¥Ã¥Á¤ò³°¤·¤Æ¥ª¥Õ¤Î¾õÂ֤ˤ·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Â³¤¤¤Æ¡¢²èÁü¤Î°ÌÃ֤ȥµ¥¤¥º¤òÊѹ¹¤·¤Þ¤¹¡£¤³¤ì¤Ë¤Ä¤¤¤Æ¤ÏǤ°Õ¤Ç¤¹¡£
¼«Ê¬¤¬¥æ¡¼¥¶¡¼¤ÎΩ¾ì¤Ë¤Ê¤Ã¤Æ¤ß¤Æ¡¢¸«¤ä¤¹¤¤°ÌÃ֤ȥµ¥¤¥º¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
»öÁ°¤ËºîÀ®¤·¤Æ¤¢¤ë Game Clear ¤Îɽ¼¨¤ÈÁ´ÂΤΥХé¥ó¥¹¤ò¸«¤Ê¤¬¤éÄ´À°¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡£³¤ÄÌܤϡ¢Á°¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÈƱ¤¸¤è¤¦¤Ë Canvas Renderer ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î¡¢Cull Transparent Mesh ¤Î¥¹¥¤¥Ã¥Á¤ò¥ª¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡ºÇ¸å¤Ë imgRestart ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î°ìÈÖ²¼¤Ë¤¢¤ë Add Component ¥Ü¥¿¥ó¤ò²¡¤·¤Æ¡¢Canvas Group ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤òÄɲä·¤Þ¤¹¡£
ÀßÄê¤ÏÉÔÍפǤ¹¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/5dHAOMk6eu.png)
Scene¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/a4xWscjvyR.jpg)
Game¥Ó¥å¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/iroWKLlwpK.jpg)
¡¡°Ê¾å¤Ç¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È¡¢ GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈÁ´ÂΤ¬´°À®¤Ç¤¹¡£
¡¡¤³¤Îµ¡Ç½¤Ï¡¢CanvasGroup ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È¡¢¤½¤Î»Ò¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥°¥ë¡¼¥×²½¤¹¤ë¤â¤Î¤Ç¤¹¤¹¡£
¤³¤ì¤Ë¤è¤ê¡¢¥°¥ë¡¼¥×Á´ÂΤÎÆ©ÌÀÅÙ¤òÊѹ¹¤·¤¿¤ê¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
¡¡´°À®¤·¤¿ GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤Ï CanvasGroup ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤·¤Æ¤¢¤ê¤Þ¤¹¡£
¤½¤Î¤¿¤á¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È¡¢¤½¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ë³Æ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬£±¤Ä¤Î¥°¥ë¡¼¥×²½¤µ¤ì¤Þ¤¹¡£
¡¡GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤«¤é¡¢CanvasGroup ¤Î Alpha¡ÊÆ©ÌÀÅ١ˤÎÃͤòÁàºî¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
Alpha ¤òÁàºî¤·¤¿¾ì¹ç¡¢¥ª¥Ö¥¸¥§¥¯¥È¤¬¥°¥ë¡¼¥×²½¤µ¤ì¤Æ¤¤¤ë¤¿¤á¡¢¿Æ¤Î GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È°ì½ï¤Ë¡¢»ÒÍ×ÁǤâ°ì½ï¤ËÆ©ÌÀ¤Ë¤Ê¤Ã¤¿¤ê¡¢¸µ¤ËÌá¤Ã¤¿¤ê¤·¤Þ¤¹¡£
¡¡¤³¤Îµ¡Ç½¤òÍøÍѤ·¤Æ¡¢¥²¡¼¥à³«»Ï»þ¤Ë¤Ï GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈÁ´ÂΤòÆ©ÌÀ¤Ë¤·¤Æ¤ª¤¤¤Æ¡¢
¥²¡¼¥à¥¯¥ê¥¢¤Î¾õÂ֤ˤ¢¤Ã¤¿¤È¤¤Ë¤Þ¤È¤á¤Æ¤¹¤Ù¤Æ¤ò°ì½ï¤Ëɽ¼¨¤¹¤ë¤è¤¦¤ËÀ©¸æ¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡¤½¤Î¤¿¤á¤Ë¤Ï¡¢CanvasGroup ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò¥¹¥¯¥ê¥×¥ÈÆâ¤ÇÍøÍѤǤ¤ë¾õÂ֤ˤ¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢
¼¡¤Î¼ê½ç¤Ç¤Ï¤½¤ÎÀ©¸æÊýË¡¤ò¼ÂÁõ¤·¤Æ¤¤¤¤Þ¤¹¡£
Unity¸ø¼°¥Þ¥Ë¥å¥¢¥ë
CanvasGroup
https://docs.unity3d.com/ja/2020.1/Manual/class-Ca...
TechProjinÍÍ
¡ÚUnity¡ÛCanvas Group¤Ã¤Æ¤³¤ó¤Ê¤ËÊØÍø¤À¤Ã¤¿¤Î¤«¡Ä
https://tech.pjin.jp/blog/2017/03/20/unity_ugui_ca...
£µ£¶¡¥UIManager ¥¹¥¯¥ê¥×¥È¤ÎºîÀ®¤¹¤ë¡£GameManager ¥¹¥¯¥ê¥×¥È¤È EnemyGenerator ¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¡¢¥Ü¥¹Æ¤È²ºÑ¤Î¥²¡¼¥à½ªÎ»È½Äê¤Ëȼ¤¤¡¢¥²¡¼¥à¥¯¥ê¥¢É½¼¨¤ÎÀ©¸æ½èÍý¤òÄɲ乤ë ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡¤¤¤Þ¤Þ¤Ç¤â¤¿¤¯¤µ¤ó¤ÎÀß·×¼ê½ç¤òÀâÌÀ¤·¤Æ¤¤Þ¤·¤¿¤¬¡¢¤½¤ì¤é¤Ë¶¦Ä̤·¤Æ¤¤¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£²¿¤«¤ï¤«¤ê¤Þ¤¹¤«¡©
¤½¤ì¤Ï¡¢¥´¡¼¥ë¤È¤Ê¤ë½èÍý¤ò·èÄꤷ¤Æ¤«¤é¡¢¤½¤ÎºÇ¸å¤Î½èÍý¤«¤é½çÈÖ¤ËÁ̤äƼÂÁõ¤ò¹Ô¤¦¡¢¤È¤¤¤¦¼ê½ç¤Ç¥í¥¸¥Ã¥¯¤òÁȤó¤Ç¤¤¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡£
¡¡º£²ó¤ÎÀ߷פˤĤ¤¤Æ¤âƱ¤¸¤è¤¦¤ÊÊýË¡¤Ç¼ÂÁõ¤ò¤·¤Æ¤¤¤¤Þ¤¹¤Î¤Ç¡¢½èÍý¤Îή¤ì¤ò¹Í¤¨¤Æ¤ß¤Þ¤·¤ç¤¦¡£
¡¡¼ÂÁõ¤·¤¿¤¤ÆâÍƤȤ·¤Æ¤Ï¡¢GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¸«¤¨¤Ê¤¤¾õÂ֤ˤ·¤Æ¤ª¤¤¤Æ¡¢
¥Ü¥¹¤òÅݤ·¤¿¤È¤¤Ë¡¢GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¸«¤¨¤ë¾õÂ֤ˤʤäơ¢¥²¡¼¥à¥¯¥ê¥¢¤ò¥æ¡¼¥¶¡¼¤ËÄÌÃΤ¹¤ë¡¢¤È¤¤¤¦°ìÏ¢¤Î½èÍý¤Îή¤ì¤Ç¤¹¡£
¡¡À߷פˤϿ§¡¹¤ÊÊýË¡¤¬¤¢¤ê¤Þ¤¹¡£Î㤨¤Ð¡¢GameManager ¥¹¥¯¥ê¥×¥È¤Ë¿§¡¹¤Ê½èÍý¤ò½¸Ìó¤·¤¿¤ê¡¢
ºÙ¤«¤¯¥¯¥é¥¹¤Ëʬ¤±¤ÆÀ߷פ¹¤ë¤è¤¦¤Ë¤·¤¿¤ê¤È¡¢¤³¤Î¹Í¤¨Êý¤¬Ê£¿ô¤¢¤ëÉôʬ¤¬¥×¥í¥°¥é¥à¤Î³Ú¤·¤¤Éôʬ¤Ç¤¢¤ê¡¢Æñ¤·¤¤Éôʬ¤Ç¤â¤¢¤ê¤Þ¤¹¡£
¡¡º£²ó¤Ï¥²¡¼¥à¥¯¥ê¥¢¤Îɽ¼¨¡¢¤½¤ì¤«¤éÀè¤Î¼ê½ç¤Ç¼ÂÁõ¤¹¤ë¥²¡¼¥à¥ª¡¼¥Ð¡¼¤Îɽ¼¨¤ò´ÉÍý¤¹¤ë¤¿¤á¤Î¥¯¥é¥¹¤ò UIManager ¥¹¥¯¥ê¥×¥È¤È¤·¤ÆÍÑ°Õ¤·¤Æ¡¢
¤½¤Á¤é¤ËÌ¿Îá¤ò½Ð¤¹¤³¤È¤Ë¤è¤Ã¤Æ¡¢¥²¡¼¥à²èÌ̤˥²¡¼¥à¥¯¥ê¥¢¤Îɽ¼¨¤ä¥²¡¼¥à¥ª¡¼¥Ð¡¼¤Îɽ¼¨¤ò¹Ô¤¦À߷פˤ·¤Æ¹Í¤¨¤Æ¤¤¤¤Þ¤¹¡£
¡¡¸½ºß¤Î°ìÏ¢¤Îή¤ì¤ò¥í¥¸¥Ã¥¯¤Ë¤·¤Æ¤ß¤Þ¤¹¡£
¡ã¥í¥¸¥Ã¥¯¤Îή¤ì¡ä
¡¡¢¤£±¡¥GameManager ¥¹¥¯¥ê¥×¥È¤«¤é UIManager ¥¹¥¯¥ê¥×¥È¤ËÌ¿Îá¤ò½Ð¤·¤Æ¡¢GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¸«¤¨¤Ê¤¤¾õÂ֤ˤ¹¤ë ¡¡¡»£²¡¥¥Ü¥¹Æ¤È²¤·¤¿¤é¡¢EnemyGenerator ¥¹¥¯¥ê¥×¥È¤«¤é GameManager ¥¹¥¯¥ê¥×¥È¤ËÌ¿Îá¤ò½Ð¤·¤Æ¡¢¥²¡¼¥à½ªÎ»¤Î¾õÂÖ¤ËÀÚ¤êÂؤ¨¤ë ¡¡¢¤£³¡¥¥Ü¥¹Æ¤È²¤·¤¿¤é¡¢EnemyGenerator ¥¹¥¯¥ê¥×¥È¤«¤é GameManager ¥¹¥¯¥ê¥×¥È¤ËÌ¿Îá¤ò½Ð¤·¤Æ¡¢¥²¡¼¥à¥¯¥ê¥¢¤Î½àÈ÷¤ò¹Ô¤ï¤»¤ë ¡¡¢¤£´¡¥GameManager ¥¹¥¯¥ê¥×¥È¤«¤é UIManager ¥¹¥¯¥ê¥×¥È¤ËÌ¿Îá¤ò½Ð¤·¤Æ¡¢GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¸«¤¨¤ë¾õÂ֤ˤ¹¤ë
¡¡¡»¤ÎÉôʬ¤Ï¼ÂÁõºÑ¤Ç¤¹¡£»Ä¤ê¤Î£³¤Ä¢¤¤ÎÉôʬ¤ò¼ÂÁõ¤·¤Æ¤¤¤¤Þ¤¹¡£
¡¡¤³¤Î¤È¤¡¢ºÇ½é¤Ë¼ÂÁõ¤ò¹Ô¤¦¤Î¤Ï¡¢¢¤£±¤ÎGameManager ¥¹¥¯¥ê¥×¥È¤Î½¤Àµ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
²¿¸Î¤Ê¤é¡¢¤³¤Î½èÍý¤Ç¤Ï UIManager ¥¹¥¯¥ê¥×¥È¤¬¤Þ¤À¸ºß¤·¤Æ¤¤¤Ê¤¤¤¿¤á¡¢½èÍý¤òµ½Ò¤¹¤ë¤³¤È¤¬½ÐÍè¤Ê¤¤¤¿¤á¤Ç¤¹¡£
¤â¤·¤âµ½Ò¤·¤Æ¤â¥¨¥é¡¼¤¬½Ð¤Æ¤·¤Þ¤Ã¤Æ¥³¥ó¥Ñ¥¤¥ë¤¬Ä̤ê¤Þ¤»¤ó¡£
¡¡¤â¤¦¤´Íý²ò¤µ¤ì¤¿¤È»×¤¤¤Þ¤¹¤¬¡¢¤³¤Î¤è¤¦¤Ë¡¢½èÍý¤ÎºÇ½é¤«¤é¼ÂÁõ¤ò¹Ô¤ª¤¦¤È¤¹¤ë¤È¡¢
¤ê¤Ê¤¤¾ðÊó¤¬Â¿¤¹¤®¤Æ¡¢¼ÂÁõ¤ò¹Ô¤¦¤³¤È¤¬º¤Æñ¤Ë¤Ê¤ë¥±¡¼¥¹¤¬¤Û¤È¤ó¤É¤Ç¤¹¡£
¡¡¤½¤Î¤¿¤á¡¢°ìÏ¢¤Î½èÍý¤ò¤¹¤Ù¤Æ¥í¥¸¥Ã¥¯¤È¤·¤ÆºîÀ®¤·¤Æ¡¢¥´¡¼¥ë¤È¤Ê¤ë½èÍý¤ò·èÄꤷ¤Æ¤«¤é¡¢
¥´¡¼¥ë¤ÎÊý¸þ¤«¤é¥¹¥¿¡¼¥È¤ÎÊý¸þ¤Ë½èÍý¤ò¼ÂÁõ¤·¤Æ¤¤¤¯¤è¤¦¤Ë¤·¤Æ¤¤¤Þ¤¹¡£
¡¡º£²ó¤Î¾ì¹ç¤Ï¢¤£±¤È¢¤£´¤ÏƱ¤¸¥¹¥¯¥ê¥×¥È¤Ø¤Îµ½Ò¤Ç¤¹¡£¤Þ¤¿¡¢¡»£²¤È¢¤£³¤âƱ¤¸¥¹¥¯¥ê¥×¥È¤Ø¤Îµ½Ò¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡¤½¤·¤Æ¤½¤ì¤é¤ÎÁ°Äó¤È¤·¤Æ¡¢¿·¤·¤¤ UIManager ¥¹¥¯¥ê¥×¥È¤ÎºîÀ®¤¬É¬Íפˤʤê¤Þ¤¹¤Î¤Ç¡¢
½èÍý¤òºî¤Ã¤Æ¤¤¤¯½çÈ֤Ȥ·¤Æ¤Ï¡¢¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
¡ã½èÍý¤Î¼ÂÁõ½çÈÖ¡ä
¡¡£±¡¥UIManager ¥¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë¡£¤½¤Î¤¿¤á¤Ë¤Ï¡¢UIManager ¥¹¥¯¥ê¥×¥È¤ò¥¢¥¿¥Ã¥Á¤¹¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò»öÁ°¤ËºîÀ®¤·¤Æ¤ª¤¯ ¡¡£²¡¥UIManager ¥¹¥¯¥ê¥×¥È¤ò UIManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥¢¥¿¥Ã¥Á¤·¤Æ¡¢ÀßÄê¤ò¹Ô¤¤¡¢¥²¡¼¥àÆâ¤ÇÍøÍѤǤ¤ë¾õÂ֤ˤ¹¤ë ¡¡£³¡¥GameManager ¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤Æ¡¢¢¤£±¤È¢¤£´¤Î½èÍý¤òÄɲ乤롣UIManager ¥¹¥¯¥ê¥×¥È¤Ë¤Ï¥á¥½¥Ã¥É¤¬ÍÑ°Õ¤·¤Æ¤¢¤ë¤Î¤Ç½èÍý¤¬µ½Ò¤Ç¤¤ë ¡¡£´¡¥GameManager ¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤Æ¡¢¢¤£³¤Î¤¿¤á¤Î½èÍý¤òÄɲ乤롣 ¡¡£µ¡¥EnemyGenerator ¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤Æ¡¢¢¤£³¤Î½èÍý¤òÄɲ乤롣GameManager ¥¹¥¯¥ê¥×¥È¤Ë¤Ï¥á¥½¥Ã¥É¤¬ÍÑ°Õ¤·¤Æ¤¢¤ë¤Î¤Ç½èÍý¤¬µ½Ò¤Ç¤¤ë
¡¡¤³¤Î¤è¤¦¤Ê½çÈ֤ǤμÂÁõ¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡ÂçÀڤʤ³¤È¤Ï¡¢¥í¥¸¥Ã¥¯¤Ç¹Í¤¨¤¿½çÈ֤ȼÂÁõ¤Î½çÈÖ¤¬Æ±¤¸¤Ë¤Ê¤ëɬÍפϤʤ¤¡¢¤È¤¤¤¦¤³¤È¤Ç¤¹¡£
½èÍý¤Î·ë²Ì¤È¤·¤Æ¥í¥¸¥Ã¥¯Ä̤ê¤ËÆ°¤±¤ÐÌäÂ꤬¤Ê¤¤Ìõ¤Ç¤¹¤«¤é¡¢É¬¤º¤·¤â¡¢¼ÂÁõ¤¹¤ë½çÈÖ¤ò¥í¥¸¥Ã¥¯¤Ë¹ç¤ï¤»¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¡£
¡¡¤¤¤Þ¤Þ¤Ç¼ÂÁõ¤·¤Æ¤¤¿½èÍý¤â¸«Ä¾¤·¤Ä¤Ä¡¢¤³¤Î¤³¤È¤òǰƬ¤Ë¤ª¤¤¤Æ¡¢½èÍý¤òºî¤Ã¤Æ¤¤¤¤Þ¤·¤ç¤¦¡£
¡¡¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÏUI¤Î´ÉÍý¤ò¹Ô¤¦ UIManager ¥¹¥¯¥ê¥×¥È¤ò¥¢¥¿¥Ã¥Á¤¹¤ë¤¿¤á¤ÎÌò³ä¤ò»ý¤Ä¤â¤Î¤Ç¤¹¡£
¥¹¥¯¥ê¥×¥È¤Ë¤è¤Ã¤ÆUI¤Î´ÉÍý¼Ô¤È¤·¤Æ¤Î¿¶¤ëÉñ¤¤¤òÍ¿¤¨¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¤¬¡¢¥×¥ì¥¤¥ä¡¼¤ä¥¨¥Í¥ß¡¼¤Î¤è¤¦¤Ê¥²¡¼¥à²èÌ̤˱Ǥ¹¤è¤¦¤Ê¾ðÊó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
¡¡¤½¤Î¤¿¤á¡¢¤³¤Î UIManager ¥¹¥¯¥ê¥×¥ÈÍѤΥ²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï Canvas Æâ¤ËÀßÃÖ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤»¤ó¡£
¥Ò¥¨¥é¥ë¥¡¼¤Ë¸ºß¤·¤Æ¤¤¤ì¤ÐÌäÂê¤Ê¤¤¤¿¤á¤Ç¤¹¡£
¡¡¥Ò¥¨¥é¥ë¥¡¼¤Î¶õ¤¤¤Æ¤¤¤ë¾ì½ê¤Ç±¦¥¯¥ê¥Ã¥¯¤ò¤¹¤ë¤«¡¢¥Ò¥¨¥é¥ë¥¡¼¤Î²¼¤Ë¤¢¤ë¥×¥é¥¹¥Ü¥¿¥ó¤ò²¡¤·¤Æ¥á¥Ë¥å¡¼¤ò³«¤¤Þ¤¹¡£
Create Empty ¤òÁªÂò¤·¡¢¶õ¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò£±¤ÄºîÀ®¤·¤Þ¤¹¡£Ì¾Á°¤ò UIManager ¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Transform ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Position ¤ò³Îǧ¤·¡¢0 °Ê³°¤Ë¤Ê¤Ã¤Æ¤¤¤¿¤é¡¢Reset ¤ò¼Â¹Ô¤·¤Æ¡¢¤¹¤Ù¤Æ¤Î Position ¤ÎÃͤò 0 ¤ËÌᤷ¤Æ¤¯¤À¤µ¤¤¡£
(Canvas ³°¤ËºîÀ®¤·¤Æ¤¤¤ë¤Î¤Ç¡¢RectTransform ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ç¤Ï¤Ê¤¯¡¢Ä̾ï¤Î Transform ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£)
¥Ò¥¨¥é¥ë¥¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/0NYp8_FYGU.png)
UIManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/5Rtpefj6W8.png)
¡¡°Ê¾å¤Ç¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï´°À®¤Ç¤¹¡£
¡¡À߷פνèÍý¤Î½çÈÖ¤ò³Îǧ¤·¤Ê¤¬¤é¡¢¤³¤Î¥¹¥¯¥ê¥×¥È¤ËÍÑ°Õ¤¹¤ë¤Ù¤¾ðÊó¤ä½èÍý¤ò¹Í¤¨¤Æ¼ÂÁõ¤·¤Æ¤¤¤¤Þ¤·¤ç¤¦¡£
¢¤£±¡¥GameManager ¥¹¥¯¥ê¥×¥È¤«¤é UIManager ¥¹¥¯¥ê¥×¥È¤ËÌ¿Îá¤ò½Ð¤·¤Æ¡¢GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¸«¤¨¤Ê¤¤¾õÂ֤ˤ¹¤ë ¡¡¢¤£´¡¥GameManager ¥¹¥¯¥ê¥×¥È¤«¤é UIManager ¥¹¥¯¥ê¥×¥È¤ËÌ¿Îá¤ò½Ð¤·¤Æ¡¢GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¸«¤¨¤ë¾õÂ֤ˤ¹¤ë
¡¡¤³¤Î¥¹¥¯¥ê¥×¥È¤Ë¤Ï¡¢£²¤Ä¤ÎÀ©¸æ½èÍý¤¬É¬Íפˤʤê¤Þ¤¹¡£¤³¤ì¤é¤Î½èÍý¤Ï¤É¤Á¤é¤â³°Éô¤Î¥¹¥¯¥ê¥×¥È(GameManager ¥¹¥¯¥ê¥×¥È)¤è¤ê¼Â¹Ô¤µ¤ì¤ëÌ¿Îá¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢
public ½¤¾þ»Ò¤ò»ý¤Ä¥á¥½¥Ã¥É¤ò£²¤ÄÍÑ°Õ¤·¤Æ¡¢¤½¤ì¤¾¤ì¤Î½èÍý¤ÎÃæ¤Ë¡¢GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¾õÂÖ¤òÀ©¸æ¤¹¤ë½èÍý¤òµ½Ò¤·¤Þ¤¹¡£
¡¡GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤Ï CanvasGroup ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç
¤³¤Î¾ðÊó¤òÍøÍѤǤ¤ë¾õÂ֤ˤ·¡¢CanvasGroup ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î»ý¤Äµ¡Ç½¤òÍøÍѤ·¤Æ¡¢Alpha ¤ÎÃͤòÁàºî¤¹¤ë½èÍý¤ò¤½¤ì¤¾¤ìµ½Ò¤¹¤ë¤È¤è¤¤¤Ç¤·¤ç¤¦¡£
¡¡¢¤£±¤Î¸«¤¨¤Ê¤¤¾õÂ֤ˤ¹¤ë½èÍý¤Ï¥²¡¼¥à¼Â¹Ô¤ÈƱ»þ¤Ë¸Æ¤Ó½Ð¤µ¤ì¤ë½èÍý¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢¤¹¤°¤Ë Alpha ¤ÎÃͤò 0 ¤ËÁàºî¤·¤¿Êý¤¬¤è¤¤¤Ç¤¹¤¬¡¢
¢¤£´¤Î¸«¤¨¤ë¾õÂ֤ˤ¹¤ë½èÍý¤Ï¤¹¤°¤Ë Alpha ¤ÎÃͤò 1 ¤Ë¤·¤Æ¤â¤è¤¤¤Ç¤¹¤·¡¢DOTween ¤Îµ¡Ç½¤òÍøÍѤ·¤Æ½ù¡¹¤Ë Alpha ¤ÎÃͤò 0 => 1 ¤Ë°ÜÆ°¤µ¤»¤Æ¤â¤è¤¤¤Ç¤¹¡£
¤½¤Î¾ì¹ç¤Ï½ù¡¹¤Ë¥²¡¼¥à¥¯¥ê¥¢¤Îɽ¼¨¤¬¸«¤¨¤Æ¤¯¤ë¤è¤¦¤Ë¤Ê¤ë½èÍý¤¬¼ÂÁõ½ÐÍè¤Þ¤¹¡£
UIManager.cs
¡¡¥¹¥¯¥ê¥×¥È¤òºîÀ®¤·¤¿¤é¥»¡¼¥Ö¤·¤Þ¤¹¡£
¡¡DOTween ¤Îµ¡Ç½¤ÎÃæ¤Ë¤Ï¡¢ÆÃÄê¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ç¤Î¤ß¼Â¹Ô¤¹¤ë¤³¤È¤¬²Äǽ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¥á¥½¥Ã¥É¤¬¤¢¤ê¤Þ¤¹¡£
º£²ó¼ÂÁõ¤·¤Æ¤¤¤ë DOFade ¥á¥½¥Ã¥É¤â¤½¤Î£±¤Ä¤Ç¤¹¡£
¡¡¤³¤ì¤Ï CanvasGroup ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ä¡¢AudioSource ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ê¤É¤Î°ìÉô¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ç¤Î¤ß¼ÂÁõ¤¬²Äǽ¤Êµ¡Ç½¤Ç¤¹¡£
// GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆ©ÌÀÅÙ¤ò½ù¡¹¤Ë 1 ¤·¤Æ¥²¡¼¥à¥¯¥ê¥¢É½¼¨ canvasGroupGameClear.DOFade(1.0f, 0.25f);
¡¡½èÍý¤Îµ½ÒÆâÍƤȤ·¤Æ¤ÏÂè1°ú¿ô¤ËÂоݤȤʤëÃÍ¡¢Âè2°ú¿ô¤Ë¡¢¤½¤ÎÂоݤÎÃͤˤʤë¤Þ¤Ç¤Ë¤«¤±¤ë»þ´Ö¤È¡¢½ñ¼°¤ÏƱ¤¸¤Ç¤¹¡£
¤É¤Á¤é¤â float ·¿¤Ç¤Î»ØÄê¤Ë¤Ê¤ê¤Þ¤¹¡£
¤³¤Î¤È¤¡¢Âè1°ú¿ô¤ËÀßÄê¤Ç¤¤ë¾ðÊ󤬡¢CanvasGroup ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î¾ì¹ç¤Ë¤Ï¡¢Alpha ¤ÎÃͤ˸ÂÄꤵ¤ì¤Þ¤¹¡£
¡¡
¡¡¤½¤Î¤¿¤á DOFade ¥á¥½¥Ã¥É¤òÍøÍѤ¹¤ë¤È¡¢CanvasGroup ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î Alpha ¤ÎÃͤòÂè2°ú¿ô¤Ç»ØÄꤷ¤¿»þ´Ö¤ò¤«¤±¤Æ
½ù¡¹¤Ë¸º¾¯¤µ¤»¤¿¤ê¡¢²Ã»»¤·¤¿¤ê¤È¤¤¤¦½èÍý¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡¥²¡¼¥à²èÌ̾å¤Ç¤Ï¤É¤Î¤è¤¦¤Ë¤Ê¤ë¤«¤È¤¤¤¦¤È¡¢½ù¡¹¤Ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¤ê¡¢½ù¡¹¤Ë¸«¤¨¤Ê¤¯¤Ê¤Ã¤Æ¤¤¤¯¤È¤¤¤¦½èÍý¤¬¼ÂÁõ¤Ç¤¤Þ¤¹¡£
¤Þ¤¿¡¢AudioSource ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ËÍøÍѤ·¤¿¾ì¹ç¤Ë¤Ï¡¢½ù¡¹¤Ë²»Î̤¬¾®¤µ¤¯¤Ê¤Ã¤Æ¤¯¡¢½ù¡¹¤ËÂ礤¯¤Ê¤Ã¤Æ¤¤¤¯¡¢¤È¤¤¤¦½èÍý¤¬¼ÂÁõ½ÐÍè¤Þ¤¹¡£
¡¡Î㤨¤Ð¡¢¿¿¤Ã¹õ¤Ê¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤³¤Î½èÍý¤òÍøÍѤ¹¤ì¤Ð¡¢¿¿¤Ã¹õ¤Ê²èÌ̤¬½ù¡¹¤Ë¾Ã¤¨¤Æ¥²¡¼¥à²èÌ̤¬¸«¤¨¤Æ¤¯¤ë¡¢
¤¤¤ï¤æ¤ë°Åž¤Î½èÍý¤¬¼ÂÁõ½ÐÍè¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£Èó¾ï¤ËÊØÍø¤Ê½èÍý¤Ç¤¹¤Î¤Ç³èÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
¡¡ºîÀ®¤·¤¿ UIManager ¥¹¥¯¥ê¥×¥È¤ò¡¢¥Ò¥¨¥é¥ë¥¡¼¤Ë¤¢¤ë UIManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥¿¥Ã¥Á¤·¤Þ¤¹¡£
¥¢¥¿¥Ã¥Á¤·¤¿¤éɬ¤ºÂоݤΥ²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Æ¡¢¥¹¥¯¥ê¥×¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¤³¤È¤ò³Îǧ¤·¤Þ¤¹¡£
UIManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/k7X6yLBmDa.png)
¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤¹¤ë¤È¡¢UIManager ¥¹¥¯¥ê¥×¥È¤Ë canvasGroupGameClear ÊÑ¿ô¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢
¤³¤Á¤é¤ËÂоݤȤʤ륳¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
UIManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image01.seesaawiki.jp/i/o/i-school-memo/ewjsgOntaN.png)
¡¡°Ê¾å¤Ç¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï´°À®¤Ç¤¹¡£
£¶¡¥GameManager ¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¡¢UIManager ¥¹¥¯¥ê¥×¥È¤ËÍÑ°Õ¤·¤¿¥²¡¼¥à¥¯¥ê¥¢É½¼¨¤ò¹Ô¤¦À©¸æ¤ò¼Â¹Ô¤¹¤ë½èÍý¤òÄɲ乤ë ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡Àß·×¤Î¥í¥¸¥Ã¥¯¤Ë´ð¤Å¤¤¤Æ¡¢¢¤£±¤È¢¤£´¤Î½èÍý¤òµ½Ò¤¹¤ë¤¿¤á¤Ë¤Ï¤É¤Î¤è¤¦¤Ê½èÍý¤ò¤É¤ÎÉôʬ¤Ëµ½Ò¤¹¤ì¤Ð¤è¤¤¤«¡¢
¤Þ¤¿Àë¸À¤¹¤ëÊÑ¿ô¤ÏɬÍפ«¤É¤¦¤«¡¢½èÍý¤ÎÁ°¸å¤ò¹Í¤¨¤Æ¥¹¥¯¥ê¥×¥È¤ò½ñ¤¤¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
GameManager.cs
¡¡¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤¿¤é¥»¡¼¥Ö¤·¤Þ¤¹¡£
GameManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¡¢¿·¤·¤¯ public ½¤¾þ»Ò¤ÇÀë¸À¤·¤¿ÊÑ¿ô¤¬É½¼¨¤µ¤ì¤Æ¤¤¤ë¤«³Îǧ¤·¤Æ¤ª¤¤Þ¤¹¡£
GameManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
![](https://image02.seesaawiki.jp/i/o/i-school-memo/owx3oGCv0k.png)
£¸¡¥EnemyGenerator ¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤Æ¡¢TODO ¤Çµ½Ò¤·¤Æ¤ª¤¤¤¿ GameManager ¥¹¥¯¥ê¥×¥È¤Î¥²¡¼¥à¥¯¥ê¥¢¤Î½àÈ÷¤Î½èÍý¤ò¼Â¹Ô¤¹¤ë½èÍý¤òÄɲ乤ë ![](https://static.seesaawiki.jp/img/usr_second/common/icon_pen.gif)
¡¡À߷פ˴ð¤Å¤¤¤Æ¡¢¢¤£³¤Î½èÍý¤òµ½Ò¤·¤Æ¤¤¤¤Þ¤¹¡£¡»£²¤Î½èÍý¤Ï¼ÂÁõºÑ¤Ç¤¹¤Î¤ÇÌäÂꤢ¤ê¤Þ¤»¤ó¡£
¡¡Á°¤Î¼ê½ç¤Ç¡¢GameManager ¥¹¥¯¥ê¥×¥È¦¤Ë EnemyGenerator ¥¹¥¯¥ê¥×¥È¦¤«¤é¸Æ¤Ó½Ð¤¹¥á¥½¥Ã¥É¤Î½àÈ÷¤¬´°Î»¤·¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢TODO ¤Çµ½Ò¤·¤Æ¤¤¤¿Éôʬ¤ò¼ÂÁõ¤·¤Þ¤·¤ç¤¦¡£
EnemyGenerator.cs
¡¡¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤¿¤é¥»¡¼¥Ö¤·¤Þ¤¹¡£
¡¡¤¹¤Ù¤Æ¤Î½èÍý¤¬¼ÂÁõ¤Ç¤¤Þ¤·¤¿¤Î¤Ç¡¢¥²¡¼¥à¤ò¼Â¹Ô¤·¤ÆÀ©¸æ¤¬¤Ç¤¤Æ¤¤¤ë¤«³Îǧ¤·¤Æ¤ª¤¤Þ¤¹¡£
¥²¡¼¥à¤ò¼Â¹Ô¤¹¤ë¤È¡¢GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¸«¤¨¤Ê¤¤¾õÂ֤ˤʤì¤ÐÀ©¸æÀ®¸ù¤Ç¤¹¡£
¡ã¼ÂÁõÆ°²è¡¡¡¥²¡¼¥à¤ò¼Â¹Ô¤¹¤ë¤È GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬Æ©ÌÀ¤Ë¤Ê¤Ã¤Æ¸«¤¨¤Ê¤¯¤Ê¤ë¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡¡¤Ä¤Å¤±¤Æ¥Ü¥¹¤òÅݤ·¤Æ¤ß¤Þ¤·¤ç¤¦¡£
GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬¸«¤¨¤ë¾õÂ֤ˤʤì¤Ð¡¢¤³¤Á¤é¤âÀ©¸æÀ®¸ù¤Ç¤¹¡£
¡ã¼ÂÁõÆ°²è¢¡¡¥Ü¥¹¤òÅݤ¹¤È GameClearSet ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬Æ©ÌÀ¤Ç¤Ï¤Ê¤¯¤Ê¤ê¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤ë¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£
¡¡¼¡¤Ï¡¡¼ê½ç£²£·¡¡¡Ý¥²¡¼¥à¥ª¡¼¥Ð¡¼É½¼¨¤ÎºîÀ®¤È¼ÂÁõ¡Ý¡¡¤Ç¤¹¡£
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- ¥×¥í¥°¥é¥ß¥ó¥°
¥³¥á¥ó¥È¤ò¤«¤¯