ºÇ½ª¹¹¿·¡§ orika_ex_miyako 2022ǯ03·î24Æü(ÌÚ) 15:46:18ÍúÎò
£²£³¡¥GameManager¥¹¥¯¥ê¥×¥È¤Ë¥²¡¼¥à¤Î¿Ê¹Ô¾õ¶·¤ò´ÉÍý¤¹¤ëenum¤òºîÀ®¤·¤Æ´ÉÍý¤ò¹Ô¤¦
¡¡¿·¤·¤¤³Ø½¬ÆâÍƤϡ¢°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
¡¦enum¤òÍøÍѤ·¤¿¥²¡¼¥à¾õÂ֤δÉÍýÊýË¡
¡¡¤³¤³¤«¤é¤Ï¡¢¥²¡¼¥à¤Î¥Ù¡¼¥¹¤È¤Ê¤ë¥²¡¼¥à¥µ¥¤¥¯¥ë¤ÎºîÀ®¤ò¹Ô¤Ã¤Æ¤¤¤¤Þ¤¹¡£
¡ã¥²¡¼¥à¥µ¥¤¥¯¥ë¡ä
£±¡¥¥²¡¼¥à¥¹¥¿¡¼¥È ¡¡¡¡¡¡¢ £²¡¥¥²¡¼¥à¡¡¥×¥ì¥¤ ¡¡¡¡¡¡¢ £³¡¥¥²¡¼¥à½ªÎ»(¥ê¥¶¥ë¥Èɽ¼¨) ¡¡¡¡¡¡¢ £´¡¥¡Ú£±¡Û¡Á¡Ú£³¡Û¤ò·«¤êÊÖ¤¹
¡¡¤Þ¤º¤Ï¤³¤Î¥²¡¼¥à¥µ¥¤¥¯¥ë¤ò³ÎΩ¤¹¤ë¤¿¤á¤Ë¡¢GamanManager¥¹¥¯¥ê¥×¥È¤Ë¥²¡¼¥à¤Î¿Ê¹Ô¾õ¶·¤ò´ÉÍý¤µ¤»¤ëÊÑ¿ô¤òÍÑ°Õ¤·¡¢
¸½ºß¥µ¥¤¥¯¥ëÆâ¤Î¤É¤Î¾õÂ֤ǥ²¡¼¥à¤¬¿Ê¹Ô¤·¤Æ¤¤¤ë¤«¤ò´ÉÍý¤µ¤»¤Þ¤¹¡£
¡¡¤Þ¤¿¡Ú£±¡Û¤È¡Ú£²¡Û¤Ï¤¹¤Ç¤Ë¼ÂÁõºÑ¤Ç¤¹¤Î¤Ç¡¢¡Ú£³¡Û¤Î½èÍý¤ò½çÈ֤˼ÂÁõ¤·¤Æ¤¤¤¤Þ¤¹¡£
¡¡GamanManager¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤Æ¡¢¥²¡¼¥à¤Î¿Ê¹Ô¾õ¶·¤ò´ÉÍý¤¹¤ëenum¤Ç¤¢¤ëGameState¤ò¿·¤·¤¯ºîÀ®¤·¤Þ¤¹¡£
¡¡¤³¤ÎGameState¤ÎÎóµó»Ò¤Ë¤ÏReady¤äPlay¤È¤¤¤Ã¤¿¡¢¥²¡¼¥à¤Î¾õ¶·¤òɽ¸½¤¹¤ëÃͤòÍÑ°Õ¤·¡¢¤½¤ì¤ò´ÉÍýÍѤÎÊÑ¿ô¤ËÂåÆþ¤·¤Æ¥²¡¼¥à¤Î¿Ê¹Ô¾õ¶·¤ò´ÉÍý¤µ¤»¤Þ¤¹¡£
¤³¤¦¤¹¤ë¤³¤È¤Ç¥²¡¼¥à¤Î¾õÂÖ¤ò°ì¸µ²½¤·¤Æ´ÉÍý¤Ç¤¤Þ¤¹¡£¡ÊÊ£¿ô¤Î°Û¤Ê¤ë¥²¡¼¥à¾õÂÖ¤¬½Å¤Ê¤ë¤³¤È¤¬¤Ê¤¯¤Ê¤ë¡Ë
¡¡¤Þ¤¿¼¡¤Î¼ê½ç¤ÇºîÀ®¤¹¤ë¥ê¥¶¥ë¥ÈÍѤΥݥåץ¢¥Ã¥×¤Ë¤Ä¤¤¤Æ¤âTODO¤ò»È¤Ã¤Æ½àÈ÷¤ò¤·¤Æ¤ª¤¤Þ¤¹¡£
¡¡Ê£¿ô¤Î¾ì½ê¤ÇÀ©¸æ¤ò¹Ô¤¦¤è¤¦¤Ë¤Ê¤ë¤¿¤á¡¢GamanManager¥¹¥¯¥ê¥×¥È¤Î¤¤¤í¤¤¤í¤ÊÉôʬ¤ò½¤Àµ¤·¤Þ¤¹¡£
¤Þ¤¿Àè¤Û¤ÉTODO¤ÇUpdate¥á¥½¥Ã¥É¤ËÍÑ°Õ¤·¤Æ¤ª¤¤¤¿½èÍý¤ò¼ÂÁõ¤·¤Þ¤¹¡£
¡¡¥²¡¼¥à¤Î¿Ê¹Ô¾õ¶·¤ÎÀ©¸æ½èÍý¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£¤¹¤Ù¤ÆGamanManagerÆâ¤ÇÀ©¸æ¤ò¹Ô¤¤¤Þ¤¹¡£
£±¡¥Update¥á¥½¥Ã¥ÉÆâ¤Ë½èÍý¤òÄɲä·¡¢GameState¤¬Play°Ê³°¤Î¾õÂ֤Ǥϥ᥽¥Ã¥ÉÆâ¤Î½èÍý(´³»Ù¤Î¥É¥é¥Ã¥°½èÍý¡¢»Ä¤ê»þ´Ö¤Î¥«¥¦¥ó¥È½èÍý)¤¬¼Â¹Ô¤µ¤ì¤Ê¤¤¤è¤¦¤ËÄä»ß¤¹¤ë¡¢À©¸æ½èÍý¤òÄɲä¹¤ë ¡¡¡¡¡¡¢ £²¡¥Start¥á¥½¥Ã¥ÉÆâ¤Ë½èÍý¤òÄɲä·¡¢GameState¤òready¡Ê½àÈ÷Ãæ¡Ë¾õÂÖ¤ËÊѹ¹¤¹¤ë ¡¡¡¡¡¡¢ £³¡¥CreateEtos¥á¥½¥Ã¥ÉÆâ¤Î½èÍý¤òÄɲä·¡¢´³»Ù¤ÎÀ¸À®¤¬½ªÎ»¤·¤¿Ãʳ¬¤ÇGameState¤ÎȽÄê¤ò¹Ô¤¤¡¢GameState¤¬Ready¤Î¾ì¹ç¤Ë¸Â¤ê¡Ê½é²ó¤Î´³»ÙÀ¸À®»þ¤Î¤ß¡Ë¡¢GameState¤òPlay¡Ê¥×¥ì¥¤Ãæ¡Ë¤Î¾õÂÖ¤ËÊѹ¹¤¹¤ë ¡¡¡¡¡¡¢ £´¡¥GameState¤¬Play¤Ë¤Ê¤Ã¤¿¤Î¤Ç¡¢Ää»ß¤·¤Æ¤¤¤¿Update¥á¥½¥Ã¥ÉÆâ¤Î½èÍý¤¬Æ°¤»Ï¤á¤ë¡Ê´³»Ù¤Î¥É¥é¥Ã¥°½èÍý¤¬¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤ê¡¢»Ä¤ê»þ´Ö¤Î¥«¥¦¥ó¥È¤¬¹Ô¤ï¤ì¤ë¡Ë ¡¡¡¡¡¡¢ £µ¡¥»Ä¤ê»þ´Ö¤¬0¤Ë¤Ê¤Ã¤¿¤é¿·¤·¤¯ºîÀ®¤¹¤ëGameUp¥á¥½¥Ã¥É¤¬¸Æ¤Ó½Ð¤µ¤ì¤Æ¡¢GameState¤¬Result¤ËÊѹ¹¤Ë¤Ê¤ë¡£¤³¤³¤Ç¤Þ¤¿Update¥á¥½¥Ã¥ÉÆâ¤Î½èÍý¤¬Ää»ß¤¹¤ë¡£
¡¡¤³¤Î¤è¤¦¤ÊÀ©¸æ¤ò¹Ô¤¦¤è¤¦¤Ë¤·¤Þ¤¹¡£
¡¡¤½¤ì¤Ç¤ÏGamanManager¤ò½¤Àµ¤·¤Þ¤¹¡£
¡¡½¤Àµ²Õ½ê¤¬Â¿¤¤¤¿¤á¡¢¤·¤Ã¤«¤ê¤È½èÍý¤Î½çÈÖ¤ò¹Í¤¨¤Ê¤¬¤é½èÍý¤òÄɲ䷤Ƥ¯¤À¤µ¤¤¡£
¶µºà¤ò¸«¤Æ½ñ¤¤¤Æ¤¤¤ë¤À¤±¤Ç¤Ï½èÍý¤ÎÆâÍƤò³Ð¤¨¤ë¤³¤È¤¬½ÐÍè¤Þ¤»¤ó¤Î¤Ç¡¢
ɬ¤º¡¢½èÍý¤ò½ñ¤¤Ê¤¬¤é¡¢¤É¤¦¤¤¤Ã¤¿½èÍý¤¬¡¢¤É¤Î¤è¤¦¤Ê½çÈÖ¤ÇÆ°¤¤¤Æ¤¤¤ë¤Î¤«¤ò¼«Ê¬¤Ç°Õ¼±¤¹¤ë¤è¤¦¤Ë¤·¤Þ¤·¤ç¤¦¡£
GameManager.cs
¡¡GamanManager¥¹¥¯¥ê¥×¥È¤Î½¤Àµ¤¬½ªÎ»¤·¤¿¤é¡¢GamanManager¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Ç³Îǧ¤·¤Þ¤¹¡£
¿·¤·¤¯Äɲä·¤¿GameStateÊÑ¿ô¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Æ¡¢¥×¥ë¥À¥¦¥ó¥á¥Ë¥å¡¼¤È¤·¤ÆÁªÂò¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤È»×¤¤¤Þ¤¹¡£
¡¡½é´üÃÍ¤Ï Select ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤È»×¤¤¤Þ¤¹¤Î¤Ç¡¢¤½¤Î¤Þ¤Þ¤Ë¤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
GamanManager¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ËGamanManager¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤¿¾õÂ֤ǥ²¡¼¥à¤ò¼Â¹Ô¤·¤Þ¤¹¡£
¡¡¥²¡¼¥à³«»Ï¤ÈƱ»þ¤ËGameStateÊÑ¿ô¤¬ Select ¢ª Ready ¢ª Play ¤ÈÁ«°Ü¤·¤Æ¤¤¤±¤ÐÀµ¾ï¤ÊÆ°ºî¤Ç¤¹¡£
¤Þ¤¿ Play ¤Î¾õÂ֤ˤʤ俤顢»Ä¤ê»þ´Ö¤Î¥«¥¦¥ó¥È¤¬³«»Ï¤µ¤ì¤ë¤È¤È¤â¤Ë¡¢¥²¡¼¥à²èÌÌÆâ¤Î´³»Ù¤¬¥É¥é¥Ã¥°¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤«³Îǧ¤·¤Þ¤¹¡£
´³»Ù¤ÎÀ¸À®Ãæ¡ÊGameStateÊÑ¿ô¤¬ Ready ¤Î¾õÂ֡ˤǤϡ¢¥²¡¼¥à²èÌÌÆâ¤Î´³»Ù¤¬¥É¥é¥Ã¥°¤Ç¤¤Ê¤¤¤Ï¤º¤Ç¤¹¡£
¸¡¾ÚÆ°²è¡¡¡GameStateÊÑ¿ô¤¬ Select ¢ª Ready ¢ª Play ¤ÈÁ«°Ü
https://gyazo.com/bc96434aca3e2c981b124415c019abbd
¡¡¤Þ¤¿»Ä¤ê»þ´Ö¤¬ 0 ¤Ë¤Ê¤Ã¤¿ºÝ¤Ë Play ¢ª Result ¤ËÁ«°Ü¤·¤Æ¤¤¤ì¤Ð¡¢Àµ¾ï¤ÊÆ°ºî¤Ç¤¹¡£¤É¤Á¤é¤âÌäÂ꤬¤Ê¤¤¤«¡¢³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£
¥Ç¥Ð¥Ã¥°¤¹¤ëºÝ¤Ë¤ÏGameData¤ÎInitTimeÊÑ¿ô¤ò 60 ¤«¤é 5 ¤Ê¤É¤Î¾®¤µ¤Ê¿ô»ú¤ËÊѹ¹¤¹¤ë¤È³Îǧ¤·¤ä¤¹¤¤¤Ç¤¹¡£
¡¡¤³¤Á¤é¤â Result ¾õÂ֤ˤʤ俤é»Ä¤ê»þ´Ö¤Î¥«¥¦¥ó¥È¤¬Ää»ß¤·¤Æ 0 ¤Î¤Þ¤Þ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤«¤È¡¢´³»Ù¤Î¥É¥é¥Ã¥°¤¬¤Ç¤¤Ê¤¯¤Ê¤Ã¤Æ¤¤¤ë¤«¤ò³Îǧ¤·¤Þ¤¹¡£
Update¥á¥½¥Ã¥ÉÆâ¤ÇÀ©¸æ¤ò¤·¤Æ¤¤¤ë¤¿¤á¡¢¤É¤Á¤é¤âÌäÂê¤Ê¤¯À©¸æ¤µ¤ì¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¤Î¤Ç¡¢³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£
¸¡¾ÚÆ°²è¢¡¡GameStateÊÑ¿ô¤¬ Play ¢ª Result ¤ÈÁ«°Ü
https://gyazo.com/faff3ef86e5bb07fb4651fbcbcfc9bd9
¡¡¤³¤ì¤é¤ÎGameStateÊÑ¿ô¤¬Àµ¾ï¤ËÁ«°Ü¤·¤Æ¤¤¤«¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¤½¤ÎÁ«°Ü½èÍý¤ò¹Ô¤Ã¤Æ¤¤¤ëÁ°¸å¤Ë¥¨¥é¡¼¤¬¤¢¤ë¤È»×¤ï¤ì¤Þ¤¹¤Î¤ÇÆÃÄꤷ¤Æ½¤Àµ¤ò¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£
¡¡¼¡¤Ï ¼ê½ç£±£² ¤Ç¤¹¡£
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- ¥×¥í¥°¥é¥ß¥ó¥°
¥³¥á¥ó¥È¤ò¤«¤¯