Unity¤Ë´ØÏ¢¤¹¤ëµ­»ö¤Ç¤¹

¡¡¥×¥ì¥Õ¥¡¥Ö¤Ë¤·¤¿ Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¡¢¥¹¥¯¥ê¥×¥È¤Ë¤è¤êÀ©¸æ¤ò¹Ô¤¨¤ë¤è¤¦¤Ë¡¢ÀìÍѤΥ¹¥¯¥ê¥×¥È¤òºîÀ®¤·¤Þ¤¹¡£


¡ã¼ÂÁõÆ°²è¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯

¡¡°Ê²¼¤ÎÆâÍƤǽçÈ֤˼ÂÁõ¤ò¿Ê¤á¤Æ¤¤¤­¤Þ¤¹¡£

¼ê½ç£µ¡¡¡¼Grid ÍѤΥ¯¥é¥¹¤ÎºîÀ®¡¼
¡¡£¹¡¥Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈÀ©¸æÍѤΥ¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë
£±£°¡¥Grid ¤ÎÀ¸À®ÊýË¡¤ò½¤Àµ¤¹¤ë



¡¡¿·¤·¤¤³Ø½¬ÆâÍƤϡ¢°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£

¡¡¡¦enum ¤À¤±¤Î¥¹¥¯¥ê¥×¥È¡¦¥Õ¥¡¥¤¥ë¤ÎºîÀ®
¡¡¡¦¥×¥í¥Ñ¥Æ¥£
¡¡¡¦¥é¥à¥À¼°¤Ë¤è¤ë¥×¥í¥Ñ¥Æ¥£¤Îµ­½ÒÊýË¡
¡¡¡¦¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥¹¥¯¥ê¥×¥È¤ÇÀ©¸æ¤¹¤ë¹Í¤¨Êý
¡¡¡¦GameObject ·¿¤Ç¤Ï¤Ê¤¯¤Æ¼«ºî¥¯¥é¥¹¤Ç¥×¥ì¥Õ¥¡¥Ö¤ò¥¤¥ó¥¹¥¿¥ó¥¹¤¹¤ëÊýË¡



£¹¡¥Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈÀ©¸æÍѤΥ¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë

£±¡¥Àß·×


¡¡Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï¡¢¥Þ¥¹ÌÜ£±¤Ä¤òɽ¸½¤¹¤ë¤¿¤á¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡£
¥¯¥ê¥Ã¥¯¤ËÈ¿±þ¤Ç¤­¤ë¤è¤¦¤Ë Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤ª¤ê¡¢
»Ò¥ª¥Ö¥¸¥§¥¯¥È¤ÎÊý¤Ë¤Ï¡¢¡û¡ß¤Îɽ¼¨¤¬¹Ô¤¨¤ë¤è¤¦¤Ë Text ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

¡¡¤³¤ì¤é¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ÏÆÈΩ¤·¤Æ¤¤¤ë¤¿¤á¡¢Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï¤³¤ì¤é¤ò´ÉÍý¤Ï¤·¤Æ¤¤¤Þ¤¹¤¬¡¢
¼ÂºÝ¤Ë¤½¤ì¤é¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥È¤òÀ©¸æ¤¹¤ë¤¿¤á¤Ë¤Ï¡¢¤½¤ì¤é¤Î¾ðÊó¤ò¼èÆÀ¤·¤Ê¤¤¤ÈÀ©¸æ½ÐÍè¤Þ¤»¤ó¡£

¡¡¤³¤¦¤¤¤Ã¤¿Ê£¿ô¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥È¤òÀ©¸æ¤·¡¢¤«¤Ä¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ËÂФ·¤ÆÆÃÊ̤ÊÌò³ä¤òÍ¿¤¨¤ë¤Ë¤Ï
ÀìÍѤΥ¹¥¯¥ê¥×¥È¤ò£±¤ÄºîÀ®¤·¤Æ¡¢¤½¤ì¤ò¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥¢¥¿¥Ã¥Á¤·¡¢¥¹¥¯¥ê¥×¥È¤¬¤³¤ì¤é¤Î¾ðÊó¤ò«¤Í¤ÆÀ©¸æ¤ò¹Ô¤¨¤ë¤è¤¦¤Ë¤¹¤ëÊýË¡¤¬¤¢¤ê¤Þ¤¹¡£

¡¡³Æ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ä¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈÁ´ÂΤò¥¹¥¯¥ê¥×¥È¤«¤éÀ©¸æ¤ò¹Ô¤¦¤¿¤á¤Ë¤Ï¡¢¥¹¥¯¥ê¥×¥È¤Ï¤³¤ì¤é¤Î¾ðÊó¤ò¡ÖÃΤäƤ¤¤ë¡×¡¢
¤Ä¤Þ¤ê¡¢ÊÑ¿ô¤òÍÑ°Õ¤·¤Æ¾ðÊó¤ò¼èÆÀ¤Ç¤­¤ë¤è¤¦¤Ë¤·¤Æ¤ª¤¯¤³¤È¤¬½ÅÍפǤ¹¡£

¡¡¼ÂºÝ¤ËºîÀ®¤¹¤ëºÝ¤ËºÆÅÙÀâÌÀ¤ò¹Ô¤¤¤Þ¤¹¤¬¡¢¤½¤Î¥¹¥¯¥ê¥×¥È¤Ç´ÉÍý¤ò¹Ô¤¤¤¿¤¤¾ðÊó¤Î£±¤Ä¤È¤·¤Æ¡¢Grid ¤Ë»ý¤Á¼ç¤Î¾ðÊó¤ò´ÉÍý¤µ¤»¤ë¤³¤È¤ò¸¡Æ¤¤·¤Þ¤¹¡£

¡¡»ý¤Á¼ç¤È¤·¤Æ¤Ï¡¢¥×¥ì¥¤¥ä¡¼¤«¥³¥ó¥Ô¥å¡¼¥¿¤«¡¢¤È¤¤¤¦¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¤¬¡¢¥²¡¼¥à³«»Ï»þ¤Ë¤Ï¡Ö»ý¤Á¼ç¤Ê¤·¡×¤È¤¤¤¦¾õÂÖ¤âɬÍפˤʤê¤Þ¤¹¡£
¤½¤Î¤¿¤á¡¢Î㤨¤Ð¡¢bool ·¿¤ÎÊÑ¿ô¤Ë¤è¤Ã¤Æ¤Ï¡¢£²¤Ä¤·¤«¾õÂÖ¤ÎÊÝ»ý¤¬¤Ç¤­¤Ê¤¤¤¿¤á¡¢¤³¤Î´ÉÍý¤Ë¤ÏÉÔ¸þ¤­¤È¤¤¤¦¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£

¡¡£²¤Ä°Ê¾å¤Î¾õÂÖ¤ò»ý¤ÄÊÑ¿ô¤ò°·¤¤¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢enum(¥¤¥Ë¥å¡¼¥à¡¢¥¤¡¼¥Ê¥à)¤òºîÀ®¤·¤Æ¤ª¤¯¤È´ÉÍý¤¬³Ú¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢¤Þ¤º¤Ï¤½¤Á¤é¤òÀè¤ËºîÀ®¤·¤Þ¤¹¡£


£²¡¥GridOwnerType ¥¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë


¡¡Grid ¤Î½êÍ­¼Ô¤Î¼ïÎà¤òÅÐÏ¿¤·¤Æ¤ª¤¯¤¿¤á¤Î enum ¤ÎºîÀ®ÊýË¡¤òÄ󼨤·¤Þ¤¹¡£

¡¡enum (¥¤¥Ë¥å¡¼¥à¡¢¥¤¡¼¥Ê¥à) ¤òÍøÍѤ·¤Æ¡¢½êÍ­¼Ô¤Î¼ïÎà¤ò»öÁ°¤ËÅÐÏ¿¤·¡¢¤³¤Î¾ðÊó¤ò Grid ¤Î»ý¤Ä¾ðÊó¤È¤·¤Æ¼¡¤Î¼ê½ç¤ÇºîÀ®¤¹¤ë Grid ÍѤΥ¹¥¯¥ê¥×¥ÈÆâ¤ËÀßÄê¤Ç¤­¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£

¡¡enum ¤Î¤ß¤Ç¥¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë¾ì¹ç¡¢using ¤ÎÀë¸À¤ä¡¢MonoBehaviour(¥â¥Î¥Ó¥Ø¥¤¥Ó¥¢) ¥¯¥é¥¹¤Î·Ñ¾µ¤ÏÉÔÍפǤ¹¡£
¤½¤·¤Æ¤É¤Î¥¹¥¯¥ê¥×¥È¤«¤é¤Ç¤â·¿¤È¤·¤ÆÍøÍѲÄǽ¤Ë¤Ê¤ê¤Þ¤¹¡£

¡¡enum ¤Ç¤Ï¥²¡¼¥àÆâ¤ËÅо줵¤»¤¿¤¤¼ïÎà¤Î¾ðÊó¤ò¡¢Îóµó»Ò(¤ì¤Ã¤­¤ç¤·)¤È¤¤¤¦·Á¤Ç¼ïÎà¤òºîÀ®¤Ç¤­¤Þ¤¹¡£
º£²ó¤Ï½êÍ­¼Ô¤Î¼ïÎà¤È¤¤¤¦¾ðÊó¤ò GridOwnerType ¤È¤¤¤¦Ì¾Á°¤ÇºîÀ®¤·¡¢¤½¤ÎÃæ¤Ë½êÍ­¼Ô¤Î¼ïÎà¤òÅÐÏ¿¤·¤Æ¤ª¤­¤Þ¤¹¡£
¤³¤ì¤ÏÄɲòÄǽ¤Ê¾ðÊó¤Ç¤¹¤Î¤Ç¡¢À衹¤Ë¼ïÎबÁý¤¨¤Æ¤âÂбþ¤Ç¤­¤Þ¤¹¡£

¡¡º£²ó¤Ï¥×¥ì¥¤¥ä¡¼¡¢¥³¥ó¥Ô¥å¡¼¥¿¡¢»ý¤Á¼ç¤Ê¤·¡¢¤È¤â¤¦£±¤Ä¡¢°ú¤­Ê¬¤±¤È¤¤¤¦¾õÂÖ¤âÍÑ°Õ¤·¤Æ¤ª¤­¤Þ¤¹¡£
¤³¤ì¤Ï¡¢¤³¤Î½êÍ­¼Ô¤Î¾õÂÖ¾ðÊó¤ò´ÉÍýÍѤȤ·¤Æ¤À¤±¤Ç¤Ï¤Ê¤¯¡¢¾¡ÇÔ¤ÎȽÄê¤Ë¤âÍøÍѤǤ­¤ë¤è¤¦¤Ë¤¹¤ë¤¿¤á¤Ç¤¹¡£



GridOwnerType.cs

¡¡<=¡¡¥¯¥ê¥Ã¥¯¤¹¤ë¤È³«¤­¤Þ¤¹


¡¡¥¹¥¯¥ê¥×¥È¤òºîÀ®¤·¤¿¤é¥»¡¼¥Ö¤·¤Þ¤¹¡£



¡¡¤³¤Î¥¹¥¯¥ê¥×¥È¤Ï¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥¢¥¿¥Ã¥Á¤Ç¤­¤Þ¤»¤ó¤Î¤Ç¡¢ºîÀ®¤·¤¿»þÅÀ¤Ç¡¢¤¹¤Ù¤Æ¤Î¥¹¥¯¥ê¥×¥ÈÆâ¤ÇÍøÍѲÄǽ¤Ë¤Ê¤ê¤Þ¤¹¡£

¡¡Àè¤Û¤É¤â¤ªÅÁ¤¨¤·¤¿¤è¤¦¤Ë¡¢£³¤Ä°Ê¾å¤Î¾õÂÖ¾ðÊó¤ò´ÉÍý¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢enum ¤Ç¤½¤Î¼ïÎà¤òÅÐÏ¿¤·¤Æ¤ª¤¯¤³¤È¤ò¤ª¤¹¤¹¤á¤·¤Þ¤¹¡£

¡¡enum ¤òÍøÍѤ¹¤ë¾ì¹ç¡¢¤½¤ÎÅÐÏ¿¤·¤Æ¤¢¤ëÎóµó»Ò¤«¤é¤·¤«¾ðÊó¤ò»ØÄê¤Ç¤­¤Þ¤»¤ó¤Î¤Ç¡¢
Î㤨¤Ð¡¢Ê¸»úÎó¤È°Û¤Ê¤ê¡¢»ØÄê¤ËºÝ¤·¤ÆÂǤÁ´Ö°ã¤¨¤¬È¯À¸¤·¤Þ¤»¤ó¤Î¤Ç¡¢ÉÔÈ÷¤ÎÃͤ¬Æþ¤ë¤³¤È¤â̤Á³¤ËËɤ°¤³¤È¤¬½ÐÍè¤Þ¤¹¡£

¡¡¤³¤Î enum ¤Ë¤Ïºî¤ì¤ëÀ©¸Â¤Ê¤É¤Ï¤¢¤ê¤Þ¤»¤ó¤Î¤Ç¡¢¼«Ê¬¤Î¥²¡¼¥à¤ÎÆâÍƤ˱þ¤¸¤¿ enum ¤ò¹Í¤¨¤ÆºîÀ®¤·¤Æ±¿ÍѤ·¤Þ¤¹¡£
Î㤨¤Ð¡¢¥×¥ì¥¤¥ä¡¼¤Î¾õÂÖÍÑ(ÆÇ¡¢º®Íð¡¢áã¤ì¤È¤«)¡¢¥¢¥¤¥Æ¥à¤Î¼ïÎà(¾ÃÌ×ÉÊ¡¢Éð´ï¡¢Ëɶñ¡¢¤Ê¤É)¡¢
¥²¡¼¥à¤Î¾õÂÖ´ÉÍý(¥²¡¼¥à³«»ÏÁ°¡¢¥²¡¼¥àÃæ¡¢¥²¡¼¥à½ªÎ»¡Ë¤Ê¤É¡¢ÍÍ¡¹¤Ê¤â¤Î¤¬¤Ä¤¯¤ì¤Þ¤¹¤Î¤Ç¡¢Èó¾ï¤Ë±þÍѤ¬Íø¤¯µ¡Ç½¤Ç¤¹¡£



¡¡¤Ê¤ª enum ¤Ç¤Ï³ÆÎóµó»Ò¤Ë¼«Æ°Åª¤ËÀ°¿ô¤ÎÈֹ椬Ϳ¤¨¤é¤ì¤Þ¤¹¡£°ìÈ־夫¤é 0 ¤ÇÏ¢È֤ˤʤäƤ¤¤Þ¤¹¡£
º£²ó¤Î¾ì¹ç¤Ç¤¢¤ì¤Ð¡¢None Îóµó»Ò¤Ë¤Ï 0¡¢Opponent Îóµó»Ò¤Ë¤Ï 2 ¤Î¿ô»ú¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Þ¤¹¡£

¡¡¤³¤ÎÈÖ¹æ¤Ï¸«¤¨¤Ê¤¤¾ðÊó¤Ç¤¹¤¬¡¢Îóµó»Ò¤ò int ·¿¤Ë¥­¥ã¥¹¥È¤ò¹Ô¤¦¤³¤È¤Ç¼èÆÀ¤·¤ÆÍøÍѽÐÍè¤Þ¤¹¡£
²¼µ­¤ÎÎã¤Î¾ì¹ç¡¢value ÊÑ¿ô¤Ë¤Ï 1 ¤¬ÂåÆþ¤µ¤ì¤Þ¤¹¡£

¡ãenum ¤ÎÎóµó»Ò¤Î¥­¥ã¥¹¥È¡ä
int  value = (int)GridOwnerType.Player;

¡¡¤Þ¤¿¡¢Îóµó»Ò¤ÎÀë¸À»þ¤Ë¿ô»ú¤ò»ØÄꤷ¤ÆÂåÆþ¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£¤½¤Î¾ì¹ç¤Ë¤ÏÏ¢È֤ǤϤʤ¯¡¢»ØÄꤷ¤¿¿ôÃͤò¼èÆÀ½ÐÍè¤Þ¤¹¡£

¡ã¿ô»ú¤ÎÂåÆþ¤ÎÎã(º£²ó¤³¤ÎÊý¼°¤ÏÍøÍѤ·¤Þ¤»¤ó)¡ä
GridOwnerType.cs
public enum GridOwnerType {
¡¡¡¡None = 10,
    Player = 100,
    Opponent = 20,
    Draw = -5
}

¡¡¾åµ­¤Î¤è¤¦¤ËÂåÆþ¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢Îóµó»Ò¤ò int ·¿¤Ë¥­¥ã¥¹¥È¤¹¤ë¤È¡¢ÂåÆþ¤·¤Æ¤¢¤ëÃͤ¬¼èÆÀ½ÐÍè¤Þ¤¹¡£
º£²ó¤Ï¿ô»ú¤ÎÂåÆþ¤Ï¹Ô¤Ã¤Æ¤¤¤Þ¤»¤ó¤Î¤Ç°ìÈÖ¾å¤ÎÎóµó»Ò¤Ë¤Ï 0 ¤«¤é½çÈ֤˺ÎÈÖ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£


£³¡¥GridController ¥¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë


¡¡Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¡¢Grid ¤È¤·¤Æ¤ÎÌò³ä¤òÍ¿¤¨¤ë¤¿¤á¤Î¥¹¥¯¥ê¥×¥È¤òºîÀ®¤·¤Þ¤¹¡£

¡¡¶ñÂÎŪ¤Ë´ÉÍý¤¹¤ë¾ðÊó¤È¤·¤Æ¤Ï¡¢Àè¤Û¤É¤Î GridOwnerType ¤Ë¤è¤ë½êÍ­¼Ô¤Î¾ðÊó¡¢Grid ¤ÎÄ̤·ÈÖ¹æ¤òÀßÄꤷ¡¢²¿ÈÖÌܤΠGrid ¤Ç¤¢¤ë¤«¤òȽÊ̤Ǥ­¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
¤Þ¤¿¡¢Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ÎÀ©¸æ¤Ë¤è¤ë Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥Ü¥¿¥ó¤ò²¡¤·¤¿ºÝ¤Î½èÍý¡¢
Text ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ÎÀ©¸æ¤Ë¤è¤ë Grid ¾å¤Ë¡û¡ß¤òɽ¼¨¤µ¤»¤ë½èÍý¤Ë¤Ä¤¤¤Æ¤âºîÀ®¤·¤Þ¤¹¡£

¡¡¤³¤ì¤é¤Î Grid ¤ÎÌò³ä¤Ë±è¤Ã¤¿À©¸æ¤ò£±¤Ä¤Î¥¹¥¯¥ê¥×¥È¤Ë¤Þ¤È¤á¤Æ¤ª¤¯¤³¤È¤Ë¤è¤ê¡¢Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÌò³ä¤¬ÌÀ³Î¤Ë¤Ê¤ë¤È¤È¤â¤Ë¡¢
¤³¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀ©¸æ¤ò¹Ô¤¤¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢¤³¤Î¥¹¥¯¥ê¥×¥ÈÆâ¤ËÊÑ¿ô¤ä¥á¥½¥Ã¥É¤òµ­½Ò¤·¤Æ¤¤¤±¤Ð¤¤¤¤¡¢¤È¤¤¤¦Æ»¶Ú¤òºî¤ë¤³¤È¤Ë¤â¤Ê¤ê¤Þ¤¹¡£



¡¡Àè¤Û¤É¤«¤é¤ªÅÁ¤¨¤·¤Æ¤¤¤ë¤è¤¦¤Ë¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤Ï¡¢¤³¤ì¤é¤Î¾ðÊó¤òÍ­¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤»¤ó¡£
¤Ä¤Þ¤ê¡¢½êÍ­¼Ô¤Î¾ðÊó¤ä¡¢Ä̤·ÈÖ¹æ¤Ê¤É¤Î¾ðÊó¤Ï»ý¤Ã¤Æ¤¤¤Ê¤¤¤¿¤á¡¢´ÉÍý¤Ç¤­¤Þ¤»¤ó¡£
Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Ê¤É¤Ï¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢ÍøÍѤ¹¤ë¤¿¤á¤Ë¤Ï¡¢¤½¤Î¾ðÊó¤Î¼èÆÀ¤¬É¬Íפˤʤê¤Þ¤¹¡£

¡¡¤è¤Ã¤Æ¡¢¤³¤ì¤é¤¹¤Ù¤Æ¤ò¤Þ¤«¤Ê¤¦¤¿¤á¤Î¥¹¥¯¥ê¥×¥È¤òºîÀ®¤·¤Æ¤ª¤¯¤³¤È¤Ë¤è¤ê¡¢´ÉÍý¤ÈÀ©¸æ¤¬¹Ô¤¨¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
¼ÂºÝ¤Ë¤Ï¡¢ºîÀ®¤·¤¿¥¹¥¯¥ê¥×¥È¤È Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È¤òɳ¤Å¤±(¥¢¥¿¥Ã¥Á)¤·¤ÆÀ©¸æ¤ò¹Ô¤¤¤Þ¤¹¡£

¡¡¤Ê¤ª¡¢¥¹¥¯¥ê¥×¥È¤Î̾¾Î¤Ïʬ¤«¤ê¤ä¤¹¤µ¤ÈÌò³ä¤Ë±þ¤¸¤Æ¸¡Æ¤¤·¤Æ¤¯¤À¤µ¤¤¡£
º£²ó¤Ç¤¢¤ì¤Ð Grid ¤È¤¤¤¦Ì¾¾Î¤â¸õÊä¤Ë¤Ê¤ê¤¨¤Þ¤¹¤¬¡¢Unity ¤ËºÇ½é¤«¤é Grid ¤È¤¤¤¦¥¹¥¯¥ê¥×¥È¤¬Â¸ºß¤·¤Æ¤¤¤ë¤¿¤á¡¢
Ʊ̾¥¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë¤È¶¥¹ç¤·¤Æ¤·¤Þ¤Ã¤Æ¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤¹¡£

¡¡¤³¤¦¤¤¤Ã¤¿¥±¡¼¥¹¤ò²óÈò¤¹¤ë¼êÃʤΣ±¤Ä¤È¤·¤Æ¡¢namespace ¤È¤¤¤¦µ¡Ç½¤¬¥×¥í¥°¥é¥à¤Ë¤Ï¸ºß¤·¤Æ¤¤¤Þ¤¹¡£
¤Ç¤¹¤¬º£²ó¤Ï GridController ¤È¤¤¤¦Ê̤Î̾¾Î¤È¤·¤ÆºîÀ®¤·¡¢Æ±Ì¾¤Ë¤è¤ë¶¥¹ç¤«¤é²óÈò¤·¤Æ¤¤¤Þ¤¹¡£

¡¡¤Ê¤ª¡¢¼«ºî¤·¤¿¥¹¥¯¥ê¥×¥È¤ä¥á¥½¥Ã¥É¤Ë¤Ï¥µ¥Þ¥ê¡¼¤òµ­½Ò¤¹¤ëÊʤò¤Ä¤±¤Æ¤ª¤­¤Þ¤·¤ç¤¦¡£
Æä˥᥽¥Ã¥É¤Ø¤Î¥µ¥Þ¥ê¡¼¤Îµ­½Ò¤Ïɬ¿Ü»ö¹à¤È¤¤¤¨¤Þ¤¹¡£


GridController.cs

¡¡<=¡¡¥¯¥ê¥Ã¥¯¤¹¤ë¤È³«¤­¤Þ¤¹¡£


¡¡TODO ¤È¤Ï¡¢º£¸å½èÍý¤ò¼ÂÁõ¤¹¤ëͽÄê¤Î¾ì½ê¤Ç¤¢¤ê¡¢½èÍý¤Î½ñ¤­Ëº¤ì¤òËɻߤ¹¤ë°ÕÌ£¤â»ý¤Á¤Þ¤¹¡£
¥¹¥¯¥ê¥×¥È¤òµ­½Ò¤¹¤ëºÝ¤Ë¤Ï¡¢ÆüËܸì¤Ç½èÍý¤Î¥³¥á¥ó¥È¤ò TODO ¤ÇºÇ½é¤Ëµ­½Ò¤·¤Æ¤«¤é¥×¥í¥°¥é¥à¤Ø¤È½ñ¤­ÊѤ¨¤Æ¤¤¤¯¤È¡¢½èÍý¤¬ºî¤ê¤ä¤¹¤¯¤Ê¤ê¤Þ¤¹¡£


£´¡¥¡ã¥×¥í¥Ñ¥Æ¥£¡ä


¡¡¥×¥í¥Ñ¥Æ¥£¤È¤Ï¡¢¥¯¥é¥¹³°Éô¤«¤é¸«¤ë¤È¥á¥ó¥Ð¡¼ÊÑ¿ô¤Î¤è¤¦¤Ë¿¶¤ëÉñ¤¤¡¢ ¥¯¥é¥¹ÆâÉô¤«¤é¸«¤ë¤È¥á¥½¥Ã¥É¤Î¤è¤¦¤Ë¿¶¤ëÉñ¤¦µ¡Ç½¤Ç¤¹¡£
¤½¤Î¤¿¤á¡¢¼ÂÁõ¾õÂÖ(private½¤¾þ»Ò¤Î¤Þ¤Þ)¤òÊѹ¹¤¹¤ë¤³¤È¤Ê¤¯¡¢³°Éô¥¯¥é¥¹¤Ø¤Î»²¾È¡¦Êѹ¹¤ò¹Ô¤¨¤ëµ¡Ç½¤Ç¤¢¤ë¤¿¤á¡¢°·¤¤¤ò³Ð¤¨¤Æ¤ª¤¯¤ÈÈó¾ï¤ËÊØÍø¤Ç¤¹¡£

¡¡¤³¤ÎÆÃÀ­¤è¤ê¡¢¥×¥í¥Ñ¥Æ¥£¤òºîÀ®¤¹¤ë¾ì¹ç¡¢Â¿¤¯¤Ï private ½¤¾þ»Ò¤ÎÊÑ¿ô¤Î¾ðÊó¤ò°·¤¦¤¿¤á¤ËºîÀ®¤·¤Þ¤¹¡£
º£²ó¤Î¾ì¹ç¤Ï¡¢GridController ¥¯¥é¥¹¤Î currentGridOwnerType ÊÑ¿ô¤ËÂФ·¤Æ¤Î¥×¥í¥Ñ¥Æ¥£¤òºîÀ®¤·¤Þ¤¹¡£

¡ã¥×¥í¥Ñ¥Æ¥£¤ÎºîÀ®¡ä
    private GridOwnerType currentGridOwnerType;


¡¡¡¡/// <summary>
    /// currentGridOwnerType ¤Î¥×¥í¥Ñ¥Æ¥£
    /// </summary>
    public GridOwnerType CurrentGridOwnerType
    {
        get {
            return currentGridOwnerType;
        }
        set {
            currentGridOwnerType = value;
        } 
    }

¡¡¾åµ­¤Î¤è¤¦¤Ê¥×¥í¥Ñ¥Æ¥£¤òºîÀ®¤¹¤ë¤³¤È¤Ç¡¢private ½¤¾þ»Ò¤ÇÀë¸À¤·¤Æ¤¤¤ë currentGridOwnerType ÊÑ¿ô¤ò
¥×¥í¥Ñ¥Æ¥£¤òÍøÍѤ¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢³°Éô¥¯¥é¥¹¤«¤é»²¾È½ÐÍè¤ë¤è¤¦¤Ë¤·¤Æ¤¤¤Þ¤¹¡£
¤¿¤À¤·¸½ºß¤Ï¡¢¥Ç¥Ð¥Ã¥°ºî¶È¤Î¸úΨ²½¤Î¤¿¤á¡¢SerializeField °À­¤òÉÕÍ¿¤·¤Æ¡¢private ¤Ç¤¢¤ë¾ðÊó¤ò¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Ëɽ¼¨¤·¤Æ¤¤¤Þ¤¹¡£

¡¡private ½¤¾þ»Ò¤Ë¤ÆÀë¸À¥Õ¥£¡¼¥ë¥É¤ÇÀë¸À¤·¤¿ÊÑ¿ô¤Ë¤Ä¤¤¤Æ¤Ï¡¢³°Éô¤Î¥¯¥é¥¹¤«¤é¤Ï»²¾È¡¦Êѹ¹¤ò¹Ô¤¦¤³¤È¤¬½ÐÍè¤Þ¤»¤ó¡£
¤³¤Î¤È¤­»²¾È¤ò¹Ô¤¤¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢ÊÑ¿ô¤Î½¤¾þ»Ò¤ò public ½¤¾þ»Ò¤ËÊѹ¹¤·¤ÆÂбþ¤¹¤ë¤Î¤Ç¤Ï¤Ê¤¯
¥×¥í¥Ñ¥Æ¥£¤Î»ý¤Ä get ¥­¡¼¥ï¡¼¥É¤òÍøÍѤ·¤Æ¡¢Ìá¤êÃͤòÍøÍѤ·¤Æ private ½¤¾þ»Ò¤ÎÊÑ¿ô¤ò³°Éô¥¯¥é¥¹¤Ë»²¾È¤µ¤»¤ë¤³¤È¤ÇÂбþ¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£

¡¡¤³¤¦¤¤¤Ã¤¿µ¡Ç½¤òÃΤäƤ¤¤ë¤«¤É¤¦¤«¤ÇÀß·×Éôʬ¤¬Â礭¤¯ÊѤï¤ê¤Þ¤¹¡£
¿§¡¹¤Êµ¡Ç½¤òÃΤäƤ¤¤ì¤Ð¡¢Î㤨¤Ð¡¢º£²ó¤Ï¥×¥í¥Ñ¥Æ¥£¤ò»È¤ª¤¦¤«¡¢¤É¤¦¤·¤è¤¦¤«¡¢¤È¤¤¤¦ÁªÂò»è¤¬Áý¤¨¤Þ¤¹¤¬¡¢ÃΤé¤Ê¤±¤ì¤ÐÁªÂò»è¼«ÂΤ¬À¸¤Þ¤ì¤Þ¤»¤ó¡£

¡¡À߷פΰú¤­½Ð¤·¤ò¹­¤²¤ë¾å¤Ç¤â¡¢¿·¤·¤¤µ»½Ñ¤ò³Ð¤¨¤ë¤³¤È¡¢¾ï¤Ë³Ø½¬¤¹¤ë°ÕÍߤȸþ¾å¿´¤ò»ý¤Ä¤³¤È¤¬¥×¥í¥°¥é¥à³Ø½¬¤Î¥Ý¥¤¥ó¥È¤Ç¤¹¡£



¡¡¥×¥í¥Ñ¥Æ¥£¤òÍøÍѤ·¤¿À߷פˤè¤ê¡¢public ¤Ç¤Ï¤Ê¤¤ÊÑ¿ô¤ò³°Éô¥¯¥é¥¹¤ÇÍøÍѤǤ­¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
³°Éô¤«¤é¥×¥í¥Ñ¥Æ¥£¤ò¸Æ¤Ó½Ð¤·¤ÆÌá¤êÃͤò»²¾È¤¹¤ë½èÍý¤Î¤³¤È¤ò¥²¥Ã¥¿¡¼(getter)¤È¸Æ¤Ó¤Þ¤¹¡£

  get {
      return currentGridOwnerType;
  }



¡¡Æ±Íͤˡ¢private ½¤¾þ»Ò¤ÎÃͤò³°Éô¥¯¥é¥¹¤è¤êÊѹ¹¤·¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢¥×¥í¥Ñ¥Æ¥£¤òÃç²ð¤¹¤ë¼êË¡¤ò»È¤Ã¤Æ½ñ¤­´¹¤¨¤ë½èÍý¤ò¼ÂÁõ½ÐÍè¤Þ¤¹¡£
¤³¤Á¤é¤Î½èÍý¤Ï set ¥­¡¼¥ï¡¼¥É¤òÍøÍѤ·¤Æ½èÍý¤òµ­½Ò¤·¤Þ¤¹¡£¤½¤Î¤¿¤á¡¢¤³¤Î½èÍý¤ò¥»¥Ã¥¿¡¼(setter)¤È¸Æ¤Ó¤Þ¤¹¡£

¡¡set ¥­¡¼¥ï¡¼¥ÉÆâ¤Ë¤Ï¸Æ¤Ó½Ð¤·¸µ¤«¤é value ¤ÎÃͤǾðÊó¤¬ÆϤ¤¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢value ¤ÎÃͤòÍøÍѤ¹¤ë¤³¤È¤Ç private ½¤¾þ»Ò¤ÎÊÑ¿ô¤ËÂåÆþ½èÍý¤ò¹Ô¤¦¤³¤È¤¬½ÐÍè¤Þ¤¹¡£

  set {
      currentGridOwnerType = value;
  }

¡¡¤³¤Î½èÍý¤ò³°Éô¤Î¥¯¥é¥¹¤«¤é¼Â¹Ô¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢»²¾È¤¹¤ë¾ì¹ç¤ÈƱ¤¸¤Ç¡Ö¥¯¥é¥¹¤ÎÊÑ¿ô.¥×¥í¥Ñ¥Æ¥£Ì¾¡×¤Èµ­½Ò¤¹¤ë¤³¤È¤ÇÃͤνñ¤­´¹¤¨¤¬²Äǽ¤Ç¤¹¡£

¡¡get¡¢set ¥­¡¼¥ï¡¼¥É¤Ï¤É¤Á¤é¤«ÊÒÊý¤À¤±¤Ç¤âµ­½Ò¤Ç¤­¤Þ¤¹¡£¤Þ¤¿¡¢µ­½Ò¤¹¤ë½çÈÖ¤âǤ°Õ¤Ç¤¹¡£set ¤«¤é½ñ¤­»Ï¤á¤ë¤³¤È¤â½ÐÍè¤Þ¤¹¡£
¤Þ¤¿¥×¥í¥Ñ¥Æ¥£ÆâÉô¤Ë¾ò·ï¼°¤òÍÑ°Õ¤·¤Æ¡¢¤½¤Î·ë²Ì¤Ë¹ç¤ï¤»¤Æ½èÍý¤òÊѹ¹¤¹¤ëµ­½Ò¤â½ÐÍè¤Þ¤¹¡£


»²¹Í¥µ¥¤¥È
̤³ÎǧÈô¹Ô C ÍÍ
¥×¥í¥Ñ¥Æ¥£
https://ufcpp.net/study/csharp/oo_property.html

FEnet¥¤¥ó¥Õ¥éÍÍ¡¡¥Æ¥Ã¥¯¥Ö¥í¥°
C#¤Î¥×¥í¥Ñ¥Æ¥£¤ò»È¤¤¤³¤Ê¤½¤¦¡ª¤µ¤Þ¤¶¤Þ¤Ê¼ÂÁõÊýË¡¤ò¾Ò²ð
https://www.fenet.jp/infla/column/technology/c%E3%...


£µ¡¥¡ã¥é¥à¥À¼°¤Ë¤è¤ë¥×¥í¥Ñ¥Æ¥£¤Îµ­½ÒÊýË¡¡ä


¡¡¥é¥à¥À¼°¤Ë¤è¤ëµ­½Ò¤Ï¥×¥í¥Ñ¥Æ¥£¤Ë¤Ä¤¤¤Æ¤âÍøÍѤ¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£


¡ã¥×¥í¥Ñ¥Æ¥£¤Î½ñ¼°¤Î°ìÎã¡ä
    public GridOwnerType CurrentGridOwnerType
    {
        get { 
                 return currentGridOwnerType ; 
        }    
        set { 
                 currentGridOwnerType = value;
        }    
    }


¡ã¥é¥à¥À¼°¤Ë¤è¤ë¥×¥í¥Ñ¥Æ¥£¡ä
    public GridOwnerType CurrentGridOwnerType
    {
        get => currentGridOwnerType;
        set => currentGridOwnerType = value;
    }

¡¡get Éôʬ¤Ë¤Ä¤¤¤Æ¤Ï return ¤ò¾Êά¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£

¡¡Ãí°ÕÅÀ¤È¤·¤Æ¤Ï¡¢¥×¥í¥Ñ¥Æ¥£¤Ç¥é¥à¥À¼°¤Ë¤Ç¤­¤ë¤Î¤Ï£±¹Ôʬ¤À¤±¤Ç¤¹¡£
¤½¤Î¤¿¤á¡¢Î㤨¤Ð set Æâ¤Ë£²¹Ô°Ê¾å¤Î½èÍý¤¬¤¢¤ë¾ì¹ç¤Ë¤Ï¥é¥à¥À¼°¤Ç¤Îµ­½Ò¤Ï¤Ç¤­¤Þ¤»¤ó¡£


£¶¡¥Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥×¥ì¥Õ¥¡¥Ö¤Ë GridController ¥¹¥¯¥ê¥×¥È¤ò¥¢¥¿¥Ã¥Á¤·¤ÆÀßÄê¤ò¹Ô¤¦


¡¡¥×¥ì¥Õ¥¡¥Ö¤Î Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î¾åÉô¤Ë¤¢¤ë Open Prefab ¤òÁªÂò¤·¡¢¥×¥ì¥Õ¥¡¥ÖÊÔ½¸¥â¡¼¥É¤ËÀÚ¤êÂؤ¨¤Þ¤¹¡£

¡¡Àè¤Û¤ÉºîÀ®¤·¤¿ GridController ¥¹¥¯¥ê¥×¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥¿¥Ã¥Á¤·¤Æ¤¯¤À¤µ¤¤¡£

¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Ë GridController ¥¹¥¯¥ê¥×¥È¤¬Äɲ䵤ì¤Þ¤¹¤Î¤Ç¡¢É½¼¨¤µ¤ì¤Æ¤¤¤ëÊÑ¿ô¤ËɬÍפʾðÊó¤ò¥¢¥µ¥¤¥ó¤·¤ÆÅÐÏ¿¤·¤Þ¤¹¡£

¡¡¥¢¥µ¥¤¥ó¤Î¼ê³¤­¤Ï¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤¹¤ë¤³¤È¤Ç¥¢¥µ¥¤¥ó½ÐÍè¤Þ¤¹¡£

¡¡btnGrid ÊÑ¿ô¤Ë¤Ï¡¢Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¼«ÂΤò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
¼«Æ°Åª¤Ë Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î¾ðÊó¤ÏÊÑ¿ô¤ËÅÐÏ¿¤µ¤ì¤Þ¤¹¡£

¡¡txtGridOwnerIcon ÊÑ¿ô¤Ë¤Ï¡¢Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»Ò¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¢¤ë txtGridOwner ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
¤³¤Á¤é¤â¼«Æ°Åª¤Ë Text ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î¾ðÊó¤¬ÊÑ¿ô¤ËÅÐÏ¿¤µ¤ì¤Þ¤¹¡£

¡¡currentGridOwnerType ÊÑ¿ô¤Ë¤ÏÀßÄê¤ÏÉÔÍפǤ¹¡£enum ¤Ï½é´üÃͤȤ·¤Æ¡¢ºÇ½é¤ËÅÐÏ¿¤·¤¿Îóµó»Ò¤Î¾ðÊ󤬼«Æ°Åª¤ËÀßÄꤵ¤ì¤Þ¤¹¤Î¤Ç¡¢None ¤Ë¤Ê¤Ã¤Æ¤¤¤ì¤ÐÌäÂꤢ¤ê¤Þ¤»¤ó¡£


¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü



¡¡°Ê¾å¤ÇÀßÄê¤Ï´°Î»¤Ç¤¹¡£


£±£°¡¥Grid ¤ÎÀ¸À®ÊýË¡¤ò½¤Àµ¤¹¤ë

£±¡¥Àß·×


¡¡¤³¤Î¼ê½ç¤Ç¤Ï¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀ¸À®¤ÎÊýË¡¤Î¥Ð¥ê¥¨¡¼¥·¥ç¥ó¤Ë¤Ä¤¤¤Æ³Ø½¬¤ò¹Ô¤¤¤Þ¤¹¡£

¡¡Instasntiate ¥á¥½¥Ã¥É¤Î¶ñÂÎŪ¤ÊÍøÍÑÎã¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢¤·¤Ã¤«¤ê¤È³Ø½¬¤·¡¢³èÍѤǤ­¤ë¤è¤¦¤Ë¤·¤Æ¤¤¤­¤Þ¤·¤ç¤¦¡£
¤³¤Î¼êË¡¤¬½¬ÆÀ¤Ç¤­¤Æ¤¤¤ë¤«¤É¤¦¤«¤Ë¤è¤ê¡¢½èÍý¤Îµ­½Ò¤Î°ú¤­½Ð¤·¤¬Áý¤¨¤Þ¤¹¤Î¤Ç¡¢¤È¤Æ¤â½ÅÍפʳؽ¬¤Ë¤Ê¤ê¤Þ¤¹¡£



£²¡¥GameManager ¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤¹¤ë


¡¡¤³¤³¤Ç¤ÏÁ°²ó¤Î¥µ¥ó¥×¥ë¤È¤·¤ÆÍÑ°Õ¤·¤¿ GameManager ¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤ÆºîÀ®¤·¤Æ¤¤¤Þ¤¹¡£
¼«Ê¬¤Ç½ñ¤¤¤¿¥¹¥¯¥ê¥×¥È¤¬¤¢¤ë¾ì¹ç¤Ë¤Ï¡¢¤½¤Á¤é¤òÍ¥À褷¤Æ½¤Àµ¤¯¤À¤µ¤¤¡£

¡¡¥×¥ì¥Õ¥¡¥Ö¤Î¥¯¥í¡¼¥ó¤ÎÀ¸À®¤Ë¤Ï GameObject ·¿¤òÍøÍѤ·¤Æ¤¤¤Þ¤·¤¿¤¬¡¢Instasntiate ¥á¥½¥Ã¥É¤Ç¤Ï
¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¥¹¥¯¥ê¥×¥È(¥¯¥é¥¹)¤Î¾ðÊó¤òÍøÍѤ·¤Æ¥×¥ì¥Õ¥¡¥Ö¤Î¥¯¥í¡¼¥ó¤òÀ¸À®¤¹¤ë¤³¤È¤â½ÐÍè¤Þ¤¹¡£

¡¡¤½¤Î¤¿¤á¡¢ÊÑ¿ô¤ÎÀë¸À¤ò GameObject ·¿¤Ç¤Ï¤Ê¤¯¡¢GridController ·¿¤ËÊѹ¹¤·¤Þ¤¹¡£
¤Þ¤¿¡¢ÇÛÎó¤Ç´ÉÍý¤·¤Æ¤¤¤¿·¿¤â GameObject ·¿¤Ç¤¹¤¬¡¢¤³¤Á¤é¤â GridController ·¿¤Ç´ÉÍý¤ò¹Ô¤¦¤è¤¦¤ËÊѹ¹¤·¤Þ¤¹¡£


GameManager.cs

¡¡<=¡¡¥¯¥ê¥Ã¥¯¤¹¤ë¤È³«¤­¤Þ¤¹¡£



£´¡¥¡ãGameObject ·¿¤Ç¤Ï¤Ê¤¯¤Æ¼«ºî¥¯¥é¥¹¤Ç¥×¥ì¥Õ¥¡¥Ö¤ò¥¤¥ó¥¹¥¿¥ó¥¹¤¹¤ëÊýË¡¡ä


¡¡Instantiate ¥á¥½¥Ã¥É¤Ë¤ÏÌá¤êÃͤ¬¤¢¤ê¡¢¤½¤Î·¿¤Ï Object ·¿¤Ç¤¹¡£(GameObject ·¿¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó)
Object ·¿¤È¤Ï¡¢¤¹¤Ù¤Æ¤Î¥¯¥é¥¹¤Ë¼«Æ°Åª¤Ë¥µ¥Ý¡¼¥È¤µ¤ì¤ë¥¯¥é¥¹(·¿)¤Ç¤¹¡£¤³¤ì¤Ï¡¢C# ¥×¥í¥°¥é¥à¤Ë¤ª¤±¤ë´ðËÜ¥¯¥é¥¹¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£

MicroSoft
Object ¥¯¥é¥¹
https://docs.microsoft.com/ja-jp/dotnet/api/system...


¡¡¤½¤Î¤¿¤á¡¢Unity ¤Ë¤ª¤¤¤ÆºîÀ®¤µ¤ì¤Æ¤¤¤ë¥¯¥é¥¹(·¿)¡¼GameObject ·¿¡¢Transform ·¿¡¢Rigidbody ·¿¤Ê¤É¡¼¤Ï¡¢¤¹¤Ù¤Æ¤³¤Î Object ¥¯¥é¥¹¤Î¾ðÊó¤òÍ­¤·¤Æ¤¤¤Þ¤¹¡£
ÍøÍÑÉÑÅ٤ι⤤ ToString ¥á¥½¥Ã¥É¤â¡¢¤³¤Î Object ·¿¤Ë¤è¤Ã¤ÆÄ󶡤µ¤ì¤Æ¤¤¤ë¥á¥½¥Ã¥É¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡


¡¡Instantiate ¥á¥½¥Ã¥É¤Ç¤ÏÂ裱°ú¿ô¤Ë»ØÄꤷ¤¿ Object ·¿¤Î¥¯¥í¡¼¥ó¤ÎÀ¸À®¤ò¹Ô¤¦¤È¤È¤â¤Ë¡¢À¸À®¤ò¹Ô¤Ã¤¿·¿¤òÌá¤êÃͤȤ·¤Æº¸ÊÕ¤ØÌᤷ¤Þ¤¹¡£
¤½¤Î¤¿¤á¡¢GameObject ·¿¤Ç¥¯¥í¡¼¥ó¤ÎÀ¸À®¤ò¹Ô¤¦¤È¡¢GameObject ·¿¤¬Ìá¤êÃͤȤ·¤ÆÌᤵ¤ì¤Þ¤¹¡£
GameObject ·¿¤Ï Object ·¿¤Î¾ðÊó¤òÍ­¤·¤Æ¤¤¤ë¤¿¤á¡¢¤³¤Î¤è¤¦¤Ë Object ·¿°Ê³°¤Î·¿¤Ç¤â»ØÄê½ÐÍè¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£

¡¡¤³¤Îµ¡Ç½¤Ï GameObject ·¿¤Ë¤Ï¸Â¤é¤Ê¤¤¤¿¤á¡¢¥¯¥í¡¼¥ó¤ÎÀ¸À®¤ò¹Ô¤¤¤¿¤¤¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¡¢¼«ºî¤·¤¿¥¹¥¯¥ê¥×¥È(¥¯¥é¥¹)¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï
¤½¤Î¥¹¥¯¥ê¥×¥È¤ò»È¤Ã¤Æ¡¢¥¯¥í¡¼¥ó¤ÎÀ¸À®¤ò¹Ô¤¦¤È¤È¤â¤Ë¡¢¤½¤Î¥¹¥¯¥ê¥×¥È¤Î·¿¤òÌá¤êÃͤȤ·¤ÆÌ᤹¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
¤³¤Î¾ì¹ç¡¢º¸ÊÕ¤ËÍÑ°Õ¤¹¤ë·¿¤â¥¹¥¯¥ê¥×¥È¤Î·¿¤òÍÑ°Õ¤¹¤ë¤³¤È¤ÇÌá¤êÃͤò¼õ¤±¤È¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£

¡¡¤³¤Î¾ì¹ç¤â GameObject ·¿¤ÈƱ¤¸¤Ç¡¢¼«ºî¤·¤¿¥¹¥¯¥ê¥×¥È(¥¯¥é¥¹)¤Ë¤Ï Object ·¿¤Î¾ðÊ󤬴ޤޤì¤Æ¤¤¤ë¤Î¤Ç¡¢Instantiate ¥á¥½¥Ã¥É¤ÎÂ裱°ú¿ô¤È¤·¤Æ»ØÄê¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£

¡¡¥¯¥é¥¹¤Ë¤è¤ëÀ¸À®¡¢¤È¤¤¤¦Ã±¸ì¤Ç¸«¤ë¤È¥¤¥á¡¼¥¸¤¬Ê¨¤­¤Ë¤¯¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢¤É¤Á¤é¤Î¾ì¹ç¤Ç¤¢¤Ã¤Æ¤â¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬À¸À®¤µ¤ì¤Þ¤¹¡£


¡ãGameObject·¿¤Ç¤Î¥¤¥ó¥¹¥¿¥ó¥¹½èÍý¡ä
¡¡¡¡// Àë¸À
    [SerializeField]
    private GameObject gridPrefab;

    [SerializeField]
    private GameObject [] grids;


    // ¥ë¡¼¥×ʸ¤òÍøÍѤ·¤¿À¸À®½èÍý
 ¡¡ for (int i = 0; i < grids.Length; i++) {

¡¡¡¡  ¡¡// GameObject ·¿¤Ç¥¤¥ó¥¹¥¿¥ó¥¹¤¹¤ë¤Î¤Ç¡¢Ìá¤Ã¤Æ¤¯¤ë·¿¤â GameObject ·¿
        grids[i] = Instantiate(gridPrefab, gridSetTran, false);

        // GameObject ¤Ë¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë GridController ¥¹¥¯¥ê¥×¥È¤Ë¥¢¥¯¥»¥¹¤·¤Æ¡¢SetUpGrid ¥á¥½¥Ã¥É¤ò¼Â¹Ô¤¹¤ë
¡¡¡¡¡¡¡¡// GameObject ·¿¤Ê¤Î¤Ç¡¢GetComponent ¥á¥½¥Ã¥É¤Ë¤è¤ë GridController ¥¹¥¯¥ê¥×¥È¤Î¼èÆÀ¤¬É¬Í×
        grids[i].GetComponent<GridController>().SetUpGrid(i, this);
    }



¡ã¼«ºî¥¯¥é¥¹¤Ç¤Î¥¤¥ó¥¹¥¿¥ó¥¹½èÍý¡ä
    [SerializeField]
    private GridController gridPrefab;

    [SerializeField]
    private GridController  [] grids;


    // ¥ë¡¼¥×ʸ¤òÍøÍѤ·¤¿À¸À®½èÍý
 ¡¡ for (int i = 0; i < grids.Length; i++) {

¡¡¡¡  ¡¡// GridController  ·¿¤Ç¥¤¥ó¥¹¥¿¥ó¥¹¤¹¤ë¤Î¤Ç¡¢Ìá¤Ã¤Æ¤¯¤ë·¿¤â GridController ·¿
        grids[i] = Instantiate(gridPrefab, gridSetTran, false);

        // GameObject ¤Ë¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë GridController ¥¹¥¯¥ê¥×¥È¤Ë¥¢¥¯¥»¥¹¤·¤Æ¡¢SetUpGrid ¥á¥½¥Ã¥É¤ò¼Â¹Ô¤¹¤ë
¡¡¡¡¡¡¡¡// Ìá¤êÃͤˤʤäƤ¤¤ë·¿¤¬ºÇ½é¤«¤é GridController ·¿¤Ê¤Î¤Ç¡¢GetComponent ¥á¥½¥Ã¥É¤Ë¤è¤ë GridController ¥¹¥¯¥ê¥×¥È¤Î¼èÆÀ¤¬É¬Íפʤ¤
¡¡¡¡¡¡¡¡// ¤Ä¤Þ¤ê¡¢É¬ÍפʾðÊó¤¬ÍøÍѤǤ­¤ë¾õÂÖ¤ÇÄ󶡤µ¤ì¤ë·Á¼°¤Ë¤Ê¤ë
        grids[i].SetUpGrid(i, this);
    }


¡¡°ã¤¤¤È¤·¤Æ¤Ï¡¢¥×¥ì¥Õ¥¡¥Ö¤È¤·¤ÆÅÐÏ¿¤¹¤ëºÝ¤Î·¿¤ä¡¢¥¤¥ó¥¹¥¿¥ó¥¹½èÍý¤ÎºÝ¤Îº¸ÊÕ¤ËÍÑ°Õ¤¹¤ë·¿¤¬°Û¤Ê¤ê¤Þ¤¹¡£

¡¡¤½¤·¤ÆºÇ¤âÂ礭¤Ê°ã¤¤¤Ï¡¢¥¯¥é¥¹¤Î¼èÆÀÊýË¡¤Ç¤¹¡£¥¤¥ó¥¹¥¿¥ó¥¹¤µ¤ì¤¿¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î»ý¤Ä¥¯¥é¥¹¤Î¾ðÊó¤òÍøÍѤ·¤¿¤¤¾ì¹ç¡¢
GameObject ·¿¤Ç¤¢¤ë¾ì¹ç¤Ë¤Ï°ìÅÙ¡¢GetComponet¥á¥½¥Ã¥É¤òÍøÍѤ·¤Æ¡¢Áàºî¤ò¹Ô¤¤¤¿¤¤¥¯¥é¥¹¤Î¾ðÊó¤ò¼èÆÀ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£

¡¡¤Ç¤¹¤¬²¼¤Î¥±¡¼¥¹¤Î¾ì¹ç¡¢¥¯¥é¥¹¤òÍøÍѤ·¤Æ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬À¸À®¤µ¤ì¤ë¤¿¤á¡¢GameObject ·¿¤Î¾ì¹ç¤ËɬÍ×¤Ê GetComponent¥á¥½¥Ã¥É¤Î½èÍý¤¬ÉÔÍפˤʤê¤Þ¤¹¡£
À¸À®¤µ¤ì¤ë¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ËÊѤï¤ê¤Ï¤¢¤ê¤Þ¤»¤ó¡£

¡¡²¼¤Î¼«ºî¥¯¥é¥¹¤Ç¥¤¥ó¥¹¥¿¥ó¥¹½èÍý¤ò¤·¤¿¾ì¹ç¤Ë¤Ï¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¯¥í¡¼¥ó¤òÀ¸À®¤¹¤ëÉôʬ¤ÏƱ¤¸¤Ç¤¹¤¬¡¢
Ìá¤êÃͤȤ·¤Æ GridController ¥¹¥¯¥ê¥×¥È¤ò¼õ¤±¼è¤Ã¤Æ¤¤¤ë¤¿¤á¡¢GetComponent ¥á¥½¥Ã¥É¤ò¼Â¹Ô¤»¤º¤È¤â¡¢¤½¤Î¥¹¥¯¥ê¥×¥È¤Î¾ðÊó¤ò¼«Æ°Åª¤ËÌá¤êÃͤ«¤é¼èÆÀ½ÐÍè¤Æ¤¤¤Þ¤¹¡£

¡¡¤³¤Î¤è¤¦¤Ë GetComponent ¥á¥½¥Ã¥É½èÍý¤ò¾Êά¤¹¤ë½èÍý¤ò½ñ¤¯¤³¤È¤Ç¡¢½èÍýŪ¤Ë½Å¤¤ GetComponent ½èÍý¤ÎÉé²Ù¤ò¸º¤é¤¹¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
¤â¤·¤âÀ¸À®¤·¤¿¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¯¥í¡¼¥ó¤ËÂФ·¤Æ¡¢²¿¤«½èÍý¤ò¹Ô¤¤¤¿¤¤¤è¤¦¤Ê¾ì¹ç¤Ë¤Ï¡¢GameObject·¿¤À¤±¤Ç¤Ï¤Ê¤¯¡¢¼«ºî¥¯¥é¥¹¤Ë¤ÆÀ¸À®¤¹¤ë¤³¤È¤âǰƬ¤ËÃÖ¤¤¤ÆÀ߷פ·¤Æ¤ª¤­¤Þ¤·¤ç¤¦¡£


£µ¡¥GameManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀßÄê¤ò¹Ô¤¦


¡¡GridPrefab ÊÑ¿ô¤Î·¿¾ðÊó¤¬ GameObject ·¿¤«¤é GridController ·¿¤ËÊѹ¹¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤¿¤á¡¢¥¢¥µ¥¤¥ó¤¬³°¤ì¤Æ¤¤¤ë¤È»×¤¤¤Þ¤¹¡£
¤³¤Á¤é¤Ë¡¢º£¤Þ¤Ç¤ÈƱ¤¸¤è¤¦¤Ë Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥×¥ì¥Õ¥¡¥Ö¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£

¡¡¥¢¥µ¥¤¥ó¸å¤Î () ¤Î¾ðÊó¤ËÃíÌܤ·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£º£¤Þ¤Ç¤Ï GameObject ·¿¤ò¥¢¥µ¥¤¥ó¤·¤Æ¤¤¤¿¤Î¤Ç Grid(GameObject) ¤È¤Ê¤Ã¤Æ¤¤¤Þ¤·¤¿¤¬¡¢
º£²ó¤Ï GridController ·¿¤Î¾ðÊó¤ò¥¢¥µ¥¤¥ó¤·¤Æ¤¤¤ë¤Î¤Ç¡¢Grid(GridController) ¤È¾ðÊ󤬽ñ¤­´¹¤ï¤Ã¤Æ¤¤¤Þ¤¹¡£

¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î¥¢¥µ¥¤¥ó¾ðÊó¤ÎÆɤ߲ò¤­Êý¤â¤·¤Ã¤«¤ê¤È³Ð¤¨¤ÆÃÖ¤¯¤è¤¦¤Ë¤·¤Þ¤·¤ç¤¦¡£


¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü



£¶¡¥¥²¡¼¥à¤ò¼Â¹Ô¤·¤ÆÆ°ºî¤ò³Îǧ¤¹¤ë


¡¡½èÍý¤¬´°À®¤·¤Þ¤·¤¿¤Î¤Ç¡¢ºÇ½é¤«¤éº£²ó³Ø½¬¤·¤¿ÆâÍƤò¿¶¤êÊ֤ꡢ½èÍý¤ÎÆâÍƤÎÍý²ò¤ò¿¼¤á¤Æ¤¯¤À¤µ¤¤¡£

¡¡º£²ó¤Ï¥²¡¼¥à²èÌ̤ˤª¤±¤ë½èÍý¤Ë¤ÏÊѹ¹¤¬¤Ê¤¤¤¿¤á¡¢¸«¤¿ÌÜŪ¤Ë¤Ï²¿¤âÊѤï¤ê¤Þ¤»¤ó¡£
¤½¤Î¤¿¤á¡¢¥²¡¼¥à¤ò¼Â¹Ô¤·¤¿ºÝ¤Ë¡¢º£¤Þ¤Ç¤ÈƱ¤¸¤è¤¦¤Ë Grid ¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬£¹¸ÄÀ¸À®¤µ¤ì¤ì¤ÐÌäÂꤢ¤ê¤Þ¤»¤ó¡£
Console ¥Ó¥å¡¼¤ò³Îǧ¤·¡¢GridController ¥¹¥¯¥ê¥×¥ÈÆâ¤Î SetUpGrid ¥á¥½¥Ã¥É¤Ëµ­½Ò¤·¤¿ Debug.Log ¥á¥½¥Ã¥É¤¬Æ°ºî¤·¤Æ¤¤¤ë¤³¤È¤ò³Îǧ¤·¤Þ¤·¤ç¤¦¡£


Console ¥Ó¥å¡¼




¡¡¹ç¤ï¤»¤Æ¡¢GameManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¡¢GameObject ·¿¤Ç¤Ï¤Ê¤¯¡¢
GridController ·¿¤Ë¤è¤Ã¤ÆÀ¸À®¤µ¤ì¤¿ Grid ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ Grids ÇÛÎó¤ËÂåÆþ¤µ¤ì¤Æ¤¤¤ë¤«¤ò³Îǧ¤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£


GameManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü





¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï´°À®¤Ç¤¹¡£

¡¡º£²ó¤Î¤è¤¦¤Ë¡¢¥²¡¼¥à¤ä½èÍý¤Î¸«¤¿ÌܤòÊѤ¨¤ë¤³¤È¤Ê¤¯¡¢¥×¥í¥°¥é¥à¤ÎÆâÍÆ(Ãæ¿È)¤òÀººº¤·¤Æ½¤Àµ¤·¤Æ¤¤¤¯¤³¤È¤ò¥ê¥Õ¥¡¥¯¥¿¥ê¥ó¥°¤È¤¤¤¤¤Þ¤¹¡£
¤³¤ì¤Ï¥Ð¥°¤ä¥¨¥é¡¼¤Î½¤Àµ¤Ç¤Ï¤Ê¤¯¤Æ¡¢¥×¥í¥°¥é¥àÆâÍƤθþ¾å¤òÌÜŪ¤È¤·¤Æ¹Ô¤¦¤³¤È¤ò»Ø¤·¤Þ¤¹¡£

¡¡³Ø½¬¤·¤¿ÆâÍƤϤȤƤâÊ£»¨¤Ê¥í¥¸¥Ã¥¯¤Ë¤Ê¤ê¤Þ¤¹¤¬¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¼«ºî¤·¤¿¥¹¥¯¥ê¥×¥È¤ò¥¢¥¿¥Ã¥Á¤·¡¢
¤½¤Î¥¹¥¯¥ê¥×¥È¤òÍøÍѤ·¤ÆÀ¸À®¤ò¹Ô¤¦¤È¤¤¤¦½èÍý¤Ï¡¢Èó¾ï¤Ë¿¤¯¤Î¥²¡¼¥à¤Ç±þÍѲÄǽ¤Ê¥Ñ¥¿¡¼¥ó¤Î£±¤Ä¤Ç¤¹¡£

¡¡¼¡¤Ï¡¡¼ê½ç£¶¡¡¡Ý¥¯¥é¥¹Æ±»Î¤Î·Ò¤¬¤ê¤ÎºîÀ®¡Ý¡¡¤Ç¤¹¡£

¥³¥á¥ó¥È¤ò¤«¤¯


¡Öhttp://¡×¤ò´Þ¤àÅê¹Æ¤Ï¶Ø»ß¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

ÍøÍѵ¬Ìó¤ò¤´³Îǧ¤Î¤¦¤¨¤´µ­Æþ²¼¤µ¤¤

Menu


´ðÁÃ

µ»½Ñ/Ãμ±(¼ÂÁõÎã)

3D¥¢¥¯¥·¥ç¥ó¥²¡¼¥à

2D¤ª¤Ï¤¸¤­¥²¡¼¥à(ȯŸÊÔ)

2D¶¯À©²£¥¹¥¯¥í¡¼¥ë¥¢¥¯¥·¥ç¥ó(ȯŸÊÔ)

2D¥¿¥Ã¥×¥·¥å¡¼¥Æ¥£¥ó¥°(³ÈÄ¥ÊÔ)

¥ì¡¼¥¹¥²¡¼¥à(È´¿è)

2DÊüÃÖ¥²¡¼¥à(ȯŸÊÔ)

3D¥ì¡¼¥ë¥¬¥ó¥·¥å¡¼¥Æ¥£¥ó¥°(±þÍÑÊÔ)

3Dæ½Ð¥²¡¼¥à(È´¿è)

2D¥ê¥¢¥ë¥¿¥¤¥à¥¹¥È¥é¥Æ¥¸¡¼

3D¥¿¥Ã¥×¥¢¥¯¥·¥ç¥ó(NavMeshAgent »ÈÍÑ)

2D¥È¥Ã¥×¥Ó¥å¡¼¥¢¥¯¥·¥ç¥ó(¥«¥¨¥ë¤Î°Ù¤Ë¡Á¡¢¥Ü¥³¥¹¥«¥¦¥©¡¼¥ºÉ÷)

VideoPlayer ¥¤¥Ù¥ó¥ÈϢư¤Î¼ÂÁõÎã

VideoPlayer ¥ê¥¹¥ÈÆ⤫¤é¥à¡¼¥Ó¡¼ºÆÀ¸¤Î¼ÂÁõÎã(ȯŸ)

AR ²èÁüÉÕ¤­¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®¤Î¼ÂÁõÎã

AR ¥ê¥¹¥ÈÆ⤫¤éÀ¸À®¤Î¼ÂÁõÎã(ȯŸ)

2D¥È¥Ã¥×¥Ó¥å¡¼¥¢¥¯¥·¥ç¥ó(¥µ¥Ð¥¤¥Ð¡¼É÷)

private



¤³¤Î¥µ¥¤¥ÈÆâ¤ÎºîÉʤϥæ¥Ë¥Æ¥£¤Á¤ã¤ó¥é¥¤¥»¥ó¥¹¾ò¹à¤Î¸µ¤ËÄ󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£

´ÉÍý¿Í/Éû´ÉÍý¿Í¤Î¤ßÊÔ½¸¤Ç¤­¤Þ¤¹