ºÇ½ª¹¹¿·¡§ orika_ex_miyako 2021ǯ05·î05Æü(¿å) 13:41:53ÍúÎò
¡¡¥Ù¡¼¥¹¤È¤·¤Þ¤·¤Æ¤Ï¡¢¤«¤á¤¯¤áÍͤΤ³¤Á¤é¤Îµ»ö¤ò»²¹Í¤Ë¤µ¤»¤Æ¤¤¤¿¤À¤¤¤Æ¤ª¤ê¤Þ¤¹¡£
¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹<(_ _)>
Unity¤ò»È¤Ã¤¿£³D¥²¡¼¥à¤Îºî¤êÊý¡Ê¤«¤á¤¯¤á¡Ë
Unity¤Ç¥¡¼¤ä¥²¡¼¥à¥Ñ¥Ã¥É¤ÇÁàºî¤¹¤ë¥¹¥Æ¡¼¥¿¥¹²èÌ̤κîÀ®
https://gametukurikata.com/ui/statuswindow
¡¡¾åµ¤Î¼ÂÁõ¤ÈÁ°²ó¤Þ¤Ç¤Î£²²óʬ¤Î¼ê½ç¤Î¼ÂÁõ¤ò¹Ô¤Ã¤¿¾å¤Ç¡¢¤³¤Á¤é¤Î½èÍý¤òÄɲäǼÂÁõ¤ò¹Ô¤¤¤Þ¤¹¡£
¡ã¼ÂÁõÆ°²è¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¼ê½ç£±£¹¡¡¡Ý¥¢¥¤¥Æ¥à¤Î´ÉÍýÊýË¡¤Î±¿ÍÑ¡Ý
£³£³¡¥GameData ¥¹¥¯¥ê¥×¥È¤È DataBaseManager ¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤¹¤ë £³£´¡¥ItemButtonManager ¥¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë
¡¡¿·¤·¤¤³Ø½¬ÆâÍƤϡ¢°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
¡¡¡¦Ê£¿ô¤Î¥¹¥¯¥ê¥×¥È¤ò·Ðͳ¤¹¤ë½èÍý¤òÆɤ߲ò¤¯ ¡¡¡¦Linq¤Îµ¡Ç½¤Î¼ÂÁõÎã¡¡¡¡ÁFirstOrDefault ¥á¥½¥Ã¥É¡Á
¡¡º£²ó¤Î¼ÂÁõ¤Ï£³¤Ä¤Î¼ê½ç¤Ë±è¤Ã¤Æ¼ÂÁõ¤ò¹Ô¤¤¤Þ¤¹¡£¤½¤Î¤¿¤á¡¢¤Þ¤º¤ÏÁ´ÂΤÎή¤ì¤òÇÄ°®¤·¡¢¤½¤ì¤ò½çÈ֤˺îÀ®¤·¤Æ¤¤¤¤Þ¤¹¡£
¡»£±¡¥¥¢¥¤¥Æ¥à¥¤¥ó¥Ù¥ó¥È¥ê¡¼¤Ëɽ¼¨¤¹¤ë¥¢¥¤¥Æ¥à£±¤Ä£±¤Ä¤Î¾ðÊó¤ò ItemData ¥¯¥é¥¹¤È¤·¤ÆºîÀ®¤·¡¢¤½¤ì¤ò ItemDataSO ¥¹¥¯¥ê¥×¥¿¥Ö¥ë¡¦¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Æ´ÉÍý¤ò¹Ô¤¦¤¿¤á¤Î½àÈ÷¤ò¤¹¤ë ¡»£²¡¥¥¢¥¤¥Æ¥à¥¤¥ó¥Ù¥ó¥È¥ê¡¼Æâ¤Ëɽ¼¨¤¹¤ë¸ÄÊ̤Υ¢¥¤¥Æ¥à¤Î¥Ü¥¿¥ó¡¢¤ª¤è¤Ó¥Ç¡¼¥¿¾ðÊó¤òɽ¼¨¤¹¤ë¤¿¤á¤Î ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤È¡¢¤½¤ì¤é¤Î¾ðÊó¤òÀ©¸æ¤¹¤ë¤¿¤á¤Î ItemButtonDetail ¥¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë ¡»£³¡¥GameData ¥¹¥¯¥ê¥×¥È¤È DataBaseManager ¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤Æ¡¢ItemDataSO ¥¹¥¯¥ê¥×¥¿¥Ö¥ë¡¦¥ª¥Ö¥¸¥§¥¯¥È¤ËÅÐÏ¿¤·¤¿¥¢¥¤¥Æ¥à¤Î¾ðÊó¤ò±¿ÍѤ¹¤ë½èÍý¤ò¼ÂÁõ¤¹¤ë ¡»£´¡¥¥¢¥¤¥Æ¥à¥¤¥ó¥Ù¥ó¥È¥ê¡¼Æâ¤Ëɽ¼¨¤¹¤ë ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò½ê»ý¤·¤Æ¤¤¤ë¿ô¤Ë¹ç¤ï¤»¤ÆÀ¸À®¤ò¹Ô¤¦ ItemButtonManager ¥¹¥¯¥ê¥×¥È¤òºîÀ®¤¹¤ë
¡¡º£²ó¤Î¼ê½ç¤Ç¤Ï¡¢¡»£³¤È¡»£´¤ò¼ÂÁõ¤·¤Þ¤¹¡£
¡¡¥×¥ì¥¤¥ä¡¼¤¬½ê»ý¤·¤Æ¤¤¤ë¥¢¥¤¥Æ¥à¤Î¾ðÊó¤ò GameData ¥¹¥¯¥ê¥×¥È¤Ë¤ª¤¤¤Æ´ÉÍý¤¹¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
¤³¤ì¤Ï GameData ¤Ï¥·¥ó¥°¥ë¥È¥ó¥¯¥é¥¹¤Ç¤¹¤Î¤Ç¡¢¤¤¤º¤ì¤Î¥¹¥¯¥ê¥×¥È¤«¤é¤Ç¤â»²¾È¤¬Íưפ˹Ԥ¨¤ë¤¿¤á¤Ç¤¹¡£
¡¡¥¢¥¤¥Æ¥à¤Î¾ðÊó¤ò´ÉÍý¤¹¤ë¤¿¤á¤Ë¡¢¿·¤·¤¯ ItemInventryData ¥¯¥é¥¹¤ò¡¢Æþ¤ì»Ò¥¯¥é¥¹¤È¤·¤Æ GameData ¥¹¥¯¥ê¥×¥ÈÆâ¤ËºîÀ®¤·¤Þ¤¹¡£
¤³¤ì¤¬¥¢¥¤¥Æ¥à£±¤Ä¤Î¾ðÊó¤Ë¤Ê¤ê¤Þ¤¹¡£¤³¤³¤ËÅÐÏ¿¤Ç¤¤ë¾ðÊó¤Ï¥¢¥¤¥Æ¥à¤Î̾Á°¡¢½ê»ý¿ô¡¢Ä̤·ÈÖ¹æ¤Î£³¤Ä¤Ç¤¹¡£
¡¡¤³¤ì¤ò List ¤Ë¤·¤Æ´ÉÍý¤¹¤ë¤³¤È¤Ç¡¢Ê£¿ô¤Î¥¢¥¤¥Æ¥à¤ò½ê»ý¤Ç¤¤ë¾õÂÖ¤òºî¤ê½Ð¤·¤Þ¤¹¡£
¡¡¥¢¥¤¥Æ¥à¥¤¥ó¥Ù¥ó¥È¥ê¡¼Æâ¤ËºîÀ®¤µ¤ì¤ë¥¢¥¤¥Æ¥à¤Î¥Ü¥¿¥ó¤Ï¡¢¤³¤Î ItemInventryData ¤Î¾ðÊó¤òÍøÍѤ·¤ÆºîÀ®¤¹¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
¤è¤Ã¤Æ¡¢ItemInventryData ¤Ë¤Ê¤¤¥¢¥¤¥Æ¥à¤Î¾ðÊó¤Ï¡Ö½ê»ý¤·¤Æ¤¤¤Ê¤¤¡×¥¢¥¤¥Æ¥à¤È¤Ê¤ê¤Þ¤¹¡£
¡¡¤³¤Î¾ðÊó¤ò ItemDataSO ¥¹¥¯¥ê¥×¥¿¥Ö¥ë¡¦¥ª¥Ö¥¸¥§¥¯¥È¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë ItemData ¥¯¥é¥¹¤Î ItemName ¤È¾È¹ç¤·¤Æ¡¢¹çÃפ·¤¿¥Ç¡¼¥¿¤òÍøÍѤ¹¤ë¤è¤¦¤ÊÀ߷פˤ·¤Þ¤¹¡£
Î㤨¤Ð¡¢ItemInventryData ¤Ë "ÌôÁð" ¤È¤¤¤¦¾ðÊó¤¬ itemName ÊÑ¿ô¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢ItemDataSO ¥¹¥¯¥ê¥×¥¿¥Ö¥ë¡¦¥ª¥Ö¥¸¥§¥¯¥ÈÆâ¤Î³Æ ItemData ¤Î ItemName Æâ¤Ë¸ºß¤¹¤ë¤«¤ò£±¤Ä¤º¤Ä¥Á¥§¥Ã¥¯¤·¤Æ¤¤¤¤Þ¤¹¡£
¤½¤·¤Æ¹çÃפ·¤¿¥Ç¡¼¥¿¤¬¤¢¤Ã¤¿¾ì¹ç¡¢¤½¤Î ItemData ¤ò "ÌôÁð" ¤Î¥Ç¡¼¥¿¤Ç¤¢¤ë¤È¤·¤Æǧ¼±¤µ¤»¤Æ¡¢ÍøÍѤ¹¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
¡¡¿·¤·¤¯ ItemInventryData ¥¯¥é¥¹¤È¡¢¤³¤Î¥¯¥é¥¹¤ò¤Þ¤È¤á¤Æ´ÉÍý¤¹¤ë¤¿¤á¤Î List ÍѤÎÊÑ¿ô¤òÀë¸À¤·¤Þ¤¹¡£
¡¡¥á¥½¥Ã¥É¤Ï£²¤ÄºîÀ®¤·¤Þ¤¹¡£¤É¤Á¤é¤â Get ¡Á ¤«¤é»Ï¤Þ¤ë̾Á°¤Ç¡¢ItemInventryData ¥¯¥é¥¹´ØÏ¢¤ÎÌá¤êÃͤò»ý¤Ä¡¢¥²¥Ã¥¿¡¼¥á¥½¥Ã¥É¤Ë¤Ê¤ê¤Þ¤¹¡£
¤³¤ì¤é¤Î¥á¥½¥Ã¥É¤Ï³°Éô¤Î¥¯¥é¥¹¤«¤é¸Æ¤Ó½Ð¤µ¤ì¤ÆÍøÍѤµ¤»¤ë¤³¤È¤òÁ°Äó¤ËºîÀ®¤·¤Æ¤ª¤¤Þ¤¹¡£
³°Éô¤Î¥¯¥é¥¹¤Ç ItemInventryData ¥¯¥é¥¹¤Ë´ØÏ¢¤¹¤ë¾ðÊó¤¬É¬Íפˤʤ俤Ȥ¤Ë¤Ï¡¢¤³¤Î¥á¥½¥Ã¥É¤ò¼Â¹Ô¤¹¤ë¤³¤È¤Ç¼èÆÀ¤¬²Äǽ¤Ë¤Ê¤Ã¤Æ¤¤¤ëÀ߷פǤ¹¡£
¤³¤ì¤Ï¥·¥ó¥°¥ë¥È¥ó¥¯¥é¥¹¤Ç¤¢¤ë¤¿¤á¡¢¥á¥½¥Ã¥É¤ò¼Â¹Ô¤·¤ä¤¹¤¯¡¢ÍøÊØÀ¤ËÉÙ¤ó¤Ç¤¤¤Þ¤¹¡£
GameData.cs
¡¡¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤¿¤é¥»¡¼¥Ö¤·¤Þ¤¹¡£
¡¡GameData ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£
¿·¤·¤¯ public ½¤¾þ»Ò¤ÇÀë¸À¤·¤¿ List ¤ÎÊÑ¿ô¤¬É½¼¨¤µ¤ì¤Æ¤¤¤ì¤ÐÌäÂꤢ¤ê¤Þ¤»¤ó¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡ItemDataSO ¥¹¥¯¥ê¥×¥¿¥Ö¥ë¡¦¥ª¥Ö¥¸¥§¥¯¥È¤òÍøÍѤǤ¤ë¤è¤¦¤Ë¤¹¤ë¤¿¤á¤Ë¡¢¿·¤·¤¯ÊÑ¿ô¤òÀë¸À¤·¤Þ¤¹¡£
¤Þ¤¿¡¢¤³¤Î¥¹¥¯¥ê¥×¥¿¥Ö¥ë¡¦¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤¢¤ë ItemData ¤Î¾ðÊó¤ò¸¡º÷¤·¤ÆɬÍפʾðÊó¤ò¼èÆÀ¤¹¤ë¤¿¤á¤Î¥á¥½¥Ã¥É¤ò¿·¤·¤¯£³¤ÄºîÀ®¤·¤Þ¤¹¡£
¡¡GetItemDataFromItemNo ¥á¥½¥Ã¥É¤È GetItemDataFromItemName ¥á¥½¥Ã¥É¤Ï¡¢¤½¤ì¤¾¤ì°ú¿ô¤ÇÆϤ¤¤¿¾ðÊó¤ò¸¡º÷¸µ¤È¤·¡¢
¤³¤ÎÃͤȹçÃפ¹¤ë¥Ç¡¼¥¿¤ò»ý¤Ä ItemData ¤ò¥¹¥¯¥ê¥×¥¿¥Ö¥ë¡¦¥ª¥Ö¥¸¥§¥¯¥ÈÆâ¤Ç¸¡º÷¤·¤¿¾å¤Ç£±¤Ä¤À¤±¼èÆÀ¤·¤Æ¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¥¹¥¯¥ê¥×¥È¤Ø¤ÈÃͤòÌ᤹¥²¥Ã¥¿¡¼¥á¥½¥Ã¥É¤Ë¤Ê¤ê¤Þ¤¹¡£
¤³¤Î½èÍý¤ò¹Ô¤¦¤³¤È¤Ë¤è¤ê¡¢ItemNo¡¢¤¢¤ë¤¤¤Ï ItemName ¤Î¤¤¤º¤ì¤«¤Î¾ðÊó¤ò»ØÄꤹ¤ë¤³¤È¤¬½ÐÍè¤ì¤Ð¡¢¥¹¥¯¥ê¥×¥¿¥Ö¥ë¡¦¥ª¥Ö¥¸¥§¥¯¥ÈÆâ¤Î ItemData ¤Î¾ðÊó¤òÆÃÄê¤Ç¤¤ëÀ߷פˤʤäƤ¤¤Þ¤¹¡£
¡¡GetItemDataFromItemNo ¥á¥½¥Ã¥É¤È GetItemDataFromItemName ¥á¥½¥Ã¥É¤Ë¤ª¤±¤ë½èÍý¤ÎÆâÍƤǤ¹¤¬¡¢
ÊÒÊý¤Ï foreach + if ʸ¤òÁȤ߹ç¤ï¤»¤¿½èÍý¡¢¤â¤¦ÊÒÊý¤Ï FirstOrDefault ¥á¥½¥Ã¥É¤òÍøÍѤ·¤¿½èÍý¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¤¬¡¢
°ú¿ô¤Ç¸¡º÷¤·¤Æ¤¤¤ë¾ðÊ󤬰ۤʤë¤À¤±¤Ç¡¢½èÍý¤ÎÆâÍƤϤޤ俤¯Æ±¤¸¤â¤Î¤Ç¤¹¡£
¡¡GetEventDataFromEvnetTypeAndEventNo ¥á¥½¥Ã¥É¤Ï¡¢¤¹¤Ç¤Ë¤¢¤ë GetEventDataFromNPCEvnet ¥á¥½¥Ã¥É¤òÈÆÍÑŪ¤Ë¤·¤¿¥á¥½¥Ã¥É¤Ç¤¹¡£
GetEventDataFromNPCEvnet ¥á¥½¥Ã¥É¤Ï NPC ¤Î²ñÏäΥ¤¥Ù¥ó¥È¤Î¤ß¤ò¾È¹ç¤·¤Æ¼èÆÀ¤·¤Æ¤¤¤Þ¤¹¤¬¡¢¤³¤Á¤é¤Î¥á¥½¥Ã¥É¤Ç¤Ï
EventType ¤Ë¤è¤Ã¤Æ¾È¹çÀè¤òÊѹ¹¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤¿¤á¡¢²ñÏÃ¥¤¥Ù¥ó¥È°Ê³°¤Î¥¤¥Ù¥ó¥È¤â¸¡º÷½ÐÍè¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
¡¡½èÍý¤ÎÆâÍÆ¤Ï GetEventDataFromNPCEvnet ¥á¥½¥Ã¥É¤È°ú¿ô¤Î»ØÄê°Ê³°¤ÏƱ¤¸¤Î¤¿¤á¡¢¥³¥á¥ó¥È¤Ï¾Êά¤·¤Æ¤¤¤Þ¤¹¡£
¼«Ê¬¤Ç¥³¥á¥ó¥È¤òµ½Ò¤·¤Æ¡¢½èÍý¤ÎÍý²ò¤ò¿¼¤á¤Æ¤¯¤À¤µ¤¤¡£
DataBaseManager.cs
¡¡¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤¿¤é¥»¡¼¥Ö¤·¤Þ¤¹¡£
¡¡DataBaseManager ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£
¿·¤·¤¯ SerializeField °À¤ÇÀë¸À¤·¤¿³Æ List ¤ÎÊÑ¿ô¤¬É½¼¨¤µ¤ì¤Æ¤¤¤ì¤ÐÌäÂꤢ¤ê¤Þ¤»¤ó¡£
¡¡ItemDataSO ÊÑ¿ô¤Ë¡¢ItemDataSO ¥¹¥¯¥ê¥×¥¿¥Ö¥ë¡¦¥ª¥Ö¥¸¥§¥¯¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡Linq¡Ê¥ê¥ó¥¯¡Ë¤È¤Ï¡¢¥³¥ì¥¯¥·¥ç¥ó(Dictionary ¤ä List ¤Ê¤É)¤ÎÍ×ÁǤòÁàºî¤·¤Æ¡¢¸¡º÷¤·¤¿¤ê½¸·×¤¹¤ë½èÍý¤ò´Ê·é¤Ëµ½Ò¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¥é¥¤¥Ö¥é¥ê(Ê£¿ô¤Îµ¡Ç½¤ò¤Þ¤È¤á¤¿¤â¤Î)¤Ç¤¹¡£
¡¡Linq¤ò»ÈÍѤ¹¤ë¤¿¤á¤Ë¤ÏÀë¸À¤¬É¬Íפˤʤê¤Þ¤¹¡£¡¡
using System.Linq;
¡¡Linq¤òµ½Ò¤¹¤ëºÝ¤Ë¤Ï¥é¥à¥À¼°¤Îµ½Ò¤òÍѤ¤¤Þ¤¹¡£¥é¥à¥À¼°¤Ë¤Ä¤¤¤Æ¤Ï¤³¤Á¤é¤ò¤´³Îǧ¤¯¤À¤µ¤¤¡£
SamuraiBlogÍÍ
¡ÚC#ÆþÌç¡ÛLINQ¤Î»È¤¤ÊýÁí¤Þ¤È¤á(Select¡¢Where¡¢GroupBy¤Ê¤É)
https://www.sejuku.net/blog/56519
¡¡Linq¤Ë¤Ï¿¤¯¤Îµ¡Ç½¤¬¤¢¤ê¤Þ¤¹¤¬º£²óÍøÍѤ·¤Æ¤¤¤ëµ¡Ç½¤Ë¤Ä¤¤¤Æ¤Þ¤È¤á¤Æ¤ª¤¤Þ¤¹¡£
¤½¤Î¤Û¤«¤Îµ¡Ç½¤Ë¤Ä¤¤¤Æ¤Ïµ»ö¤¬¤¿¤¯¤µ¤ó¤¢¤ê¤Þ¤¹¤¬¡¢¤³¤Á¤é¤Î¥µ¥¤¥È¤â»²¹Í¤Ë¤Ê¤ê¤Þ¤¹¡£
ÃÏÊ¿Àþ¤Ë¹Ô¤¯ÍÍ
LINQ¤Î³ÈÄ¥¥á¥½¥Ã¥É°ìÍ÷¤È¡¢¤Û¤ÜÁ´Éô¤Î¥µ¥ó¥×¥ë¤òºî¤Ã¤Æ¤ß¤Þ¤·¤¿¡£
https://yujisoftware.hatenablog.com/entry/20111031...
¡¡FirstOrDefault ¥á¥½¥Ã¥É¤Ï»ØÄꤷ¤¿¥³¥ì¥¯¥·¥ç¥óÆâ¤ò¡¢»ØÄꤷ¤¿°ú¿ô¤ÎÃͤò´ð½à¤Ë¡¢¥³¥ì¥¯¥·¥ç¥óÆâ¤ÎÍ×ÁǤ«¤éÀèƬ¤ÎÃͤòõ¤·¤ÆÊÖ¤·¤Þ¤¹¡£¤â¤·¤â³ºÅö¤¹¤ëÃͤ¬¤Ê¤±¤ì¤Ð Null ¤òÊÖ¤·¤Þ¤¹¡£
¤³¤Î¤È¤ FirstOrDefault ¥á¥½¥Ã¥É¤Î°ú¿ô¤Ëõ¤·¤¿¤¤¾ðÊó¤Î¾ò·ï¤ò»ØÄꤹ¤ë¤³¤È¤Ë¤è¤ê¡¢ÀèƬ¤ÎÃͤǤϤʤ¯¡¢¾ò·ï¤Ë¹çÃפ·¤¿ÀèƬ¤ÎÃͤò¼èÆÀ¤¹¤ë½èÍý¤¬¼ÂÁõ½ÐÍè¤Þ¤¹¡£
¡ã¾ò·ï¤Ë¹ç¤Ã¤¿ÀèƬ¤ÎÍ×ÁǤò¼èÆÀ¡ä
¡¡return itemDataSO.itemDataList.FirstOrDefault(x => x.itemName == itemName);
¡¡¾åµ¤Î¥±¡¼¥¹¤Ç¤Ï¡¢¥³¥ì¥¯¥·¥ç¥óÆâ¤Î³Æ ItemData ¤Î itemName (x.itemName)¤¬¡¢°ú¿ô¤ÇÆϤ¤¤Æ¤¤¤ë itemName ¤È¹çÃפ¹¤ë¤«¤É¤¦¤«¤òȽÄꤷ¡¢¤½¤ÎÆâ¤ËºÇ½é¤Ë¾ò·ï¤Ë¹çÃפ·¤¿ÃͤòÌᤷ¤Æ¤¤¤Þ¤¹¡£
¡¡¤³¤Î½èÍý¤Ï¤Ä¤Þ¤ê¡¢¤½¤ÎÁ°¤Ëµ½Ò¤µ¤ì¤Æ¤¤¤ë GetItemDataFromItemNo ¥á¥½¥Ã¥ÉÆâ¤Ç¼Â¹Ô¤µ¤ì¤Æ¤¤¤ë½èÍý¤òƱ¤¸ÆâÍƤˤʤê¤Þ¤¹¡£
/// <summary> /// ItemNo ¤«¤é ItemData ¤ò¼èÆÀ /// </summary> /// <param name="itemNo"></param> /// <returns></returns> public ItemDataSO.ItemData GetItemDataFromItemNo(int itemNo) { foreach (ItemDataSO.ItemData itemData in itemDataSO.itemDataList) {¡¡¡¡//¡¡¤³¤³¤«¤é if (itemData.itemNo == itemNo) { return itemData; } } return null;¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¡¡¤³¤³¤Þ¤Ç }
¡¡¾åµ¤Î¥á¥½¥Ã¥ÉÆâ¤Î£µ¹Ôʬ¤ò½èÍý¤ò£±¹Ô¤Ç¼Â¹Ô¤·¤Æ¤¤¤ë¤â¤Î¤¬¡¢FirstOrDefault ¥á¥½¥Ã¥É¤Î¼Â¹ÔÆâÍƤˤʤê¤Þ¤¹¡£
»²¹Í¥µ¥¤¥È
±¢´³¤·Ãæ¤Î¥²¡¼¥à³«È¯¥á¥â ÍÍ
¡ÚC#,LINQ¡ÛFirst,FirstOrDefault¡ÁÇÛÎó¤ä¥ê¥¹¥È¤ÎÀèƬ¤ÎÍ×ÁǤ¬¤Û¤·¤¤¤È¤¡Á
https://www.urablog.xyz/entry/2018/05/29/070000
¡¡
¡¡¥¹¥¯¥ê¥×¥È¤Î½¤Àµ¤Ï°Ê¾å¤Ç´°Î»¤Ç¤¹¡£ºÇ¸å¤Ë¿·¤·¤¤¥¹¥¯¥ê¥×¥È¤ÎºîÀ®¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡¥¢¥¤¥Æ¥à¥¤¥ó¥Ù¥ó¥È¥ê¡¼¤ò³«¤¤¤¿ºÝ¤Ë¡¢GameData ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î GameData ¥¹¥¯¥ê¥×¥È¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¥¢¥¤¥Æ¥à¤Î¾ðÊó¤ò¸µ¤Ë
¥¤¥ó¥Ù¥ó¥È¥ê¡¼Æâ¤Ë ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¡¢¤½¤ì¤é¤Ë¥¢¥¤¥Æ¥à¤Î¾ðÊó¤òÍ¿¤¨¤Æ¿¶¤ëÉñ¤¤¤ò¼«Æ°Åª¤ËÊѹ¹¤¹¤ë¤è¤¦¤ËÀ©¸æ¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤Ï ItemButtonDetail ¥¹¥¯¥ê¥×¥È¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¤³¤Î¥¹¥¯¥ê¥×¥È¤Ë½àÈ÷¤·¤Æ¤¤¤ë¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð¤¹¤³¤È¤Ç
ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤¹¤ë¤ÈƱ»þ¤Ë¡¢¤½¤ÎItemButtonDetail ¥¹¥¯¥ê¥×¥È¤Ë¡Ö¥¢¥¤¥Æ¥à¤Î¾ðÊó= ItemData¡×¤òÀßÄꤵ¤»¤ë½èÍý¤ò¼Â¹Ô¤·¤Þ¤¹¡£
¡¡¤³¤Î¤È¤¤ËÀßÄꤵ¤ì¤ë¾ðÊó¤Ï GameData ¥¹¥¯¥ê¥×¥È¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¥¢¥¤¥Æ¥à¤Î¾ðÊ󡢤Ĥޤꡢ½ê»ý¤·¤Æ¤¤¤ë¥¢¥¤¥Æ¥à¤Î¤ß¤Ë¤Ê¤ê¤Þ¤¹¡£
°ÊÁ°³èÍѤ·¤Æ¤¤¤ë CreateItemButton ¥¹¥¯¥ê¥×¥È¤Ç¤Ï¡¢¥¢¥¤¥Æ¥à¤Î¥Ç¡¼¥¿Ê¬¤À¤±¤¹¤Ù¤ÆÀ¸À®¤·¤Æ¤ª¤¤¤Æ¡¢½ê»ý¤·¤Æ¤¤¤Ê¤¤¥¢¥¤¥Æ¥à¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¸«¤¨¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¡¢¤È¤¤¤¦À©¸æ¤Ç´ÉÍý¤·¤Æ¤¤¤Þ¤·¤¿¡£
º£²ó¤Î¼ÂÁõ¤Ç¤Ï¡¢½ê»ý¤·¤Æ¤¤¤ë¥¢¥¤¥Æ¥à¤Î¤ßÀ¸À®¤µ¤ì¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢¤³¤ÎÉôʬ¤Î½èÍý¤Îή¤ì¤¬Â礤¯°Û¤Ê¤ê¤Þ¤¹¡£
¡¡Àë¸À¤¹¤ëÊÑ¿ô¤Ë¤Ï ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î¥×¥ì¥Õ¥¡¥Ö¤òÅÐÏ¿¤¹¤ëÊÑ¿ô¤ä¡¢À¸À®¤µ¤ì¤¿ ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò´ÉÍý¤¹¤ë¤¿¤á¤Î List ¤ÎÊÑ¿ô¡¢
ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤¹¤ë°ÌÃ֤ξðÊó¤ÎÊÑ¿ô¡¢¤½¤·¤Æ Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ÎÀ©¸æ¤ò¹Ô¤¦¤¿¤á¤ÎÊÑ¿ô¤òÍÑ°Õ¤·¤Æ¤¤¤Þ¤¹¡£
¡¡Start ¥á¥½¥Ã¥ÉÆâ¤Ç¤Ï³Æ Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î OnClick ¥¤¥Ù¥ó¥È¤Ë¥á¥½¥Ã¥É¤òÅÐÏ¿¤·¤Þ¤¹¡£
¡¡CreateItemButtonDetail ¥á¥½¥Ã¥É¤ò¼Â¹Ô¤¹¤ë¤³¤È¤Ç¡¢GameData ¥¯¥é¥¹¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¥¢¥¤¥Æ¥à¤Î¾ðÊó¤ò¸µ¤Ë¤·¤Æ¡¢ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¡¢
ItemButtonDetail ¥¹¥¯¥ê¥×¥È¤ËÂФ·¤Æ¥¢¥¤¥Æ¥à¤Î¾ðÊó¤òÀßÄꤹ¤ë SetUpItemButtonDetail ¥á¥½¥Ã¥É¤ÎÌ¿Îá¤ò¼Â¹Ô¤·¤Þ¤¹¡£
À¸À®¤µ¤ì¤¿¤³¤ì¤é¤Î ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò List ¤ËÅÐÏ¿¤·¡¢´ÉÍý¤Ç¤¤ë¾õÂ֤ˤ·¤Æ¤ª¤¤Þ¤¹¡£
ItemButtonManager.cs
¡¡¥¹¥¯¥ê¥×¥È¤òºîÀ®¤·¤¿¤é¥»¡¼¥Ö¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡Start ¥á¥½¥Ã¥É¤Ç Button ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤Î OnClick ¥¤¥Ù¥ó¥È¤òÅÐÏ¿¤·¤Æ¤¤¤Þ¤¹¤¬¡¢EventTrigger ¤È¤Î·ó¤Í¹ç¤¤¤Ç½èÍý¤¬Æ°¤«¤Ê¤¤¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£
¤½¤Î¾ì¹ç¤Ë¤Ï¡¢Start ¥á¥½¥Ã¥É¤Î½èÍý¤Ï¥³¥á¥ó¥È¥¢¥¦¥È¤·¡¢MenuWindow => MenuArea => Item ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë EventTrigger ¤Ë CreateItemButtonDetails ¥á¥½¥Ã¥É¤ò£²¤«½ê¤ËÄɲ䷤Ƥ¯¤À¤µ¤¤¡£
¡ãMenuWindow / MenuArea / Item ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡ä
¡¡Æ±¤¸¤è¤¦¤Ë MenuWindow => MenuArea => Exit ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë EventTrigger ¤Ë DestroyItemButtonDetails ¥á¥½¥Ã¥É¤ò2¤«½ê¤ËÄɲ䷤Ƥ¯¤À¤µ¤¤¡£
¡ãMenuWindow / MenuArea / Exit ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡ä
£³¡¥Property ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î CreateItemButton ¥¹¥¯¥ê¥×¥È¤òºï½ü¤·¡¢ ItemButtonManager ¥¹¥¯¥ê¥×¥È¤ò¥¢¥¿¥Ã¥Á¤·¤ÆÀßÄê¤ò¹Ô¤¦
¡¡¥Ò¥¨¥é¥ë¥¡¼¤Ë¤¢¤ë Property ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ë ItemButtonManager ¥¹¥¯¥ê¥×¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥¿¥Ã¥Á¤·¤Æ¤¯¤À¤µ¤¤¡£
¥¢¥¿¥Ã¥Á¤ò¹Ô¤Ã¤¿¤éɬ¤º¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤ò³Îǧ¤·¤Þ¤¹¡£
¡¡public ½¤¾þ»Ò¤ÇÀë¸À¤·¤Æ¤¤¤ëÊÑ¿ô¤¬¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¾å¤Ëɽ¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢É¬ÍפʾðÊó¤ò¥¢¥µ¥¤¥ó¤·¤Þ¤¹¡£
¡¡itemButtonDetailPrefab ÊÑ¿ô¤Ë¤Ï¥×¥ì¥Õ¥¡¥Ö¤Ë¤·¤¿ ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡itemAreaTran ÊÑ¿ô¤Ë¤Ï Property ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈÆâ¤Ë¤¢¤ë ItemArea ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
¤³¤Î°ÌÃÖ¤Ë ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬À¸À®¤µ¤ì¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡btnItemSelectWindow ÊÑ¿ô¤È btnExitItemWindow ÊÑ¿ô¤Ï CreateItemButton ¥¹¥¯¥ê¥×¥È¤Ç¤âÍøÍѤµ¤ì¤Æ¤¤¤ë¤â¤Î¤Ç¤¹¤Î¤Ç¡¢
CreateItemButton ¥¹¥¯¥ê¥×¥È¤Î³ÆÊÑ¿ô¤ÈƱ¤¸¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò¤³¤ì¤é¤ÎÊÑ¿ô¤Ë¥¢¥µ¥¤¥ó¤·¤Æ¤¯¤À¤µ¤¤¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡¤³¤Î¼ê½ç¤è¤ê¡¢ItemButtonManager ¥¹¥¯¥ê¥×¥È¤òÍøÍѤ·¤Æ ItemButtonDetail ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¡¢¤½¤ì¤ò¥¢¥¤¥Æ¥à¥¤¥ó¥Ù¥ó¥È¥ê¡¼¤Ëɽ¼¨¤¹¤ë½èÍý¤ËÊѹ¹¤·¤Þ¤¹¤Î¤Ç¡¢
¤¤¤Þ¤Þ¤ÇÍøÍѤ·¤Æ¤¤¤¿ CreateItemButton ¥¹¥¯¥ê¥×¥È¤ÏÍøÍѤ·¤Ê¤¯¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢¤³¤ì¤òºï½ü¤·¤Þ¤¹¡£
¡¡GameData ¥¹¥¯¥ê¥×¥È¤Ë¿·¤·¤¯Äɲä·¤¿ itemInventryDatasList ÊÑ¿ô¤¬¸½ºß¥×¥ì¥¤¥ä¡¼¤¬½ê»ý¤·¤Æ¤¤¤ë¥¢¥¤¥Æ¥à·²¤Î¾ðÊó¤Ç¤¹¡£
¡¡GameData ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Î itemInventryDatasList ÊÑ¿ô¤Î¥µ¥¤¥º¤ò 1 °Ê¾å¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
¿·¤·¤¯½ê»ý¤·¤Æ¤¤¤ë¥¢¥¤¥Æ¥à¤Î¾ðÊó¤òÀßÄê¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢ItemDataSO ¥¹¥¯¥ê¥×¥¿¥Ö¥ë¡¦¥ª¥Ö¥¸¥§¥¯¥È¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¥¢¥¤¥Æ¥à¤Î̾Á°¤òÅÐÏ¿¤·¤Æ¤¯¤À¤µ¤¤¡£
¤³¤Î¾ðÊó¤ò¸µ¤Ë¤·¤Æ¡¢¥¢¥¤¥Æ¥à¥¤¥ó¥Ù¥ó¥È¥ê¡¼¤Ëɽ¼¨¤¹¤ë¥¢¥¤¥Æ¥à¤Î¥Ü¥¿¥ó¤¬Êѹ¹¤Ë¤Ê¤ê¤Þ¤¹¡£
¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü(»²¹Í)
¡¡¤Ê¤ª¡¢º£²ó¤Î¤è¤¦¤Ë¼êÆ°¤Ç½ê»ý¤·¤Æ¤¤¤ë¥¢¥¤¥Æ¥à¤Î¾ðÊó¤òÅÐÏ¿¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢³Æ Number ¤ÎÃÍ¤Ï 0 ¤«¤éÏ¢È֤ˤʤë¤è¤¦¤ËºÎÈÖ¤·¤Æ¤¯¤À¤µ¤¤¡£
¥²¡¼¥àÆâ¤Ç¼èÆÀ¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢¼«Æ°Åª¤Ë 0 ¤«¤é½çÈ֤˺ÎÈÖ¤µ¤ì¤Þ¤¹¡£
¡¡°Ê¾å¤Ç¥²¡¼¥à¤ò¼Â¹Ô¤¹¤ë¤¿¤á¤Î½àÈ÷¤¬À°¤¤¤Þ¤·¤¿¡£
¡¡¥²¡¼¥à¤ò¼Â¹Ô¤·¤Æ¡¢¥¢¥¤¥Æ¥à¤Î¥¤¥ó¥Ù¥ó¥È¥ê¡¼¤ò³«¤¤¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
GameData ¥¹¥¯¥ê¥×¥È¤ËÅÐÏ¿¤·¤¿½ê»ý¤·¤Æ¤¤¤ë¥¢¥¤¥Æ¥à¤Î¾ðÊó¤ò¸µ¤Ë¡¢¥¢¥¤¥Æ¥à¤Î¥Ü¥¿¥ó¤¬À¸À®¤µ¤ì¤Æ¥¤¥ó¥Ù¥ó¥È¥ê¡¼Æâ¤Ëʤó¤Çµï¤ì¤ÐÀ©¸æÀ®¸ù¤Ç¤¹¡£
¡ã¼ÂÁõÆ°²è¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡¡°Ê¾å¤Ç´°À®¤Ç¤¹¡£
¡¡¸½ºß¤Î½èÍý¤Ç¤¹¤È¡¢¥¢¥¤¥Æ¥à¤Î¥¤¥ó¥Ù¥ó¥È¥ê¡¼¤¬³«¤¤¤Æ¤¤¤Æ¤â¡¢¥¤¥ó¥Ù¥ó¥È¥ê¡¼Æâ¤Î¥«¡¼¥½¥ë°ÜÆ°¤Ë¹ç¤ï¤»¤Æ¡¢¸å¤í¤Ç¥×¥ì¥¤¥ä¡¼¥¥ã¥é¤â°ì½ï¤Ë°ÜÆ°¤·¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
¥¢¥¤¥Æ¥à¤Î¥¤¥ó¥Ù¥ó¥È¥ê¡¼¤¬³«¤¤¤Æ¤¤¤ë´Ö¤Ï¥×¥ì¥¤¥ä¡¼¥¥ã¥é¤¬°ÜÆ°¤»¤º¡¢¸þ¤¤âÊѤï¤é¤Ê¤¤¾õÂ֤ˤʤë¤è¤¦¤ËÀ©¸æ½èÍý¤ò¼ÂÁõ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
¡ã¼ÂÁõÆ°²è¡¡¥¢¥¤¥Æ¥à¥¤¥ó¥Ù¥ó¥È¥ê¡¼Æâ¤ò¥«¡¼¥½¥ë¤¬°ÜÆ°¤·¤Æ¤â¥×¥ì¥¤¥ä¡¼¥¥ã¥é¤¬°ÜÆ°¤»¤º¡¢¸þ¤¤âÊѤï¤é¤Ê¤¤¡ä
Æ°²è¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯
¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£
¡¡¼¡¤Ï¡¡¼ê½ç£²£°¡¡¡Ý¥Þ¥¹¥¿¡¼¥Ç¡¼¥¿¤ÎÃê½ÐÊýË¡¡Ý¡¡¤Ç¤¹¡£
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- ¥×¥í¥°¥é¥ß¥ó¥°
¤³¤Î¥Ú¡¼¥¸¤Ø¤Î¥³¥á¥ó¥È
¤´³èÍѤ¤¤¿¤À¤¤Þ¤·¤Æ¡¢¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
¤Þ¤¿¡¢¤´¼ÁÌä¤â¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
ÊÖ¿®¤Ë¤ª»þ´Ö¤ò¤¤¤¿¤À¤¤¤Æ¤·¤Þ¤¤¤Þ¤·¤Æ¡¢À¿¤Ë¿½¤·Ìõ¤´¤¶¤¤¤Þ¤»¤ó¡£
DataBaseManager.cs Æâ¤Î GetEventDataFromNP£ÃEvent ¥á¥½¥Ã¥É¤Ê¤Î¤Ç¤¹¤¬¡¢¼ê½ç13Æâ¤ÇºÇ½é¤ËºîÀ®¤ò¹Ô¤Ã¤Æ¤¤¤¿¤À¤¤¤Æ¤¤¤ëºÝ¤Ë¡¢¤³¤Î¥á¥½¥Ã¥É¤Î°ú¿ô¤ÏÀßÄꤵ¤ì¤Æ¤ª¤ê¤Þ¤¹¡£
¤½¤Î¤¿¤á¡¢DataBaseManager.cs¤Ç¤Îº£²ó¤Î½¤ÀµÉôʬ¤Ë¤Ï´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¾õ¶·¤Ç¤¹¡£
¤Á¤Ê¤ß¤Ë¡¢¤É¤Î¤è¤¦¤Ê¥¨¥é¡¼¤¬¤Ç¤Æ¤ª¤ê¤Þ¤¹¤Ç¤·¤ç¤¦¤«¡©
¤è¤í¤·¤±¤ì¤Ð¤´ÊÖ¿®¤¤¤¿¤À¤±¤Þ¤¹¤è¤¦¡¢¤è¤í¤·¤¯¤ª´ê¤¤¤¤¤¿¤·¤Þ¤¹¡£
Unity½é¿´¼Ô¤Ç¤¹¡£
¤ï¤«¤ê¤ä¤¹¤¤¥µ¥¤¥È¤ÇÈó¾ï¤Ë½õ¤«¤Ã¤Æ¤¤¤Þ¤¹¡£
º£²ó DataBaseManager.cs ¤Î etEventDataFromNPCEvnet ¥á¥½¥Ã¥É¤Î°ú¿ô¤¬Áý¤¨¤Þ¤·¤¿¤¬¡¢
¤³¤ì¤Ë¤è¤ê NonPlayerCharacter.cs Æ⤫¤é¸Æ¤Ó½Ð¤·¤Æ¤¤¤ë²Õ½ê¤¬¥¨¥é¡¼¤Ë¤Ê¤é¤Ê¤¤¤Ç¤·¤ç¤¦¤«¡©
¼«Ê¬¤Î´Ä¶¤À¤È¥¨¥é¡¼¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¦¤Î¤Ç¤¹¤¬¡£