ºÇ½ª¹¹¿·¡§ orika_ex_miyako 2023ǯ06·î25Æü(Æü) 17:38:22ÍúÎò
¡¡¤¿¤À¤·¡¢¤¹¤Ç¤Ë¥»¡¼¥Ö¡¦¥í¡¼¥É¤¬É¬ÍפʾðÊó¤Ë´Ø¤·¤Æ¤Îµ¡Ç½¼«ÂΤϴ°À®¤·¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¤³¤Î¼ê½ç¤Ç¤ÏÁ°²ó¤Î¼ê½ç¤È¹ç¤ï¤»¤Æ¡¢¤µ¤é¤Ë¥ï¥ó¥é¥ó¥¯¾å¤Î±þÍѽèÍý¤Î¼ÂÁõ¤òÌÜɸ¤È¤·¤Æ¤¤¤Þ¤¹ ¡£
¤è¤Ã¤Æ ¥¹¥¯¥ê¥×¥È¤ò¸«Ä¾¤·¤Æ¥ê¥Õ¥¡¥¯¥¿¥ê¥ó¥°¤¹¤ëÆâÍÆ ¤Ë¤Ê¤ê¤Þ¤¹¡£¤½¤Î¤¿¤á¡¢Æñ¤·¤¤½èÍý¤¬Â¿¤¯½Ð¤Æ¤¤Þ¤¹¤Î¤Ç¡¢¤¤¤Þ¤¹¤°¤Ë¼ÂÁõ¤ò¹Ô¤ï¤Ê¤¯¤Æ¤âÌäÂꤢ¤ê¤Þ¤»¤ó ¡£
ȯŸ£²£´ ¡¼¥»¡¼¥Ö¡¦¥í¡¼¥Éµ¡Ç½¤Î¼ÂÁõ¤¡¼
¡¡¿·¤·¤¤³Ø½¬ÆâÍƤϡ¢°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
¡¡¡¦¥í¡¼¥«¥ë´Ø¿ô
¡¡Àè¤Û¤É¤Î¼ê½ç¤ÇºîÀ®¤·¤¿ PlayerPrefsHelper ¥¯¥é¥¹¤ò³èÍѤ·¡¢¥»¡¼¥ÖÍѤξðÊó¤ò£±¤Ä¤Î¥¯¥é¥¹¤È¤·¤Æ´ÉÍý¤·¡¢
¤½¤ì¤ò JsonUtility ¥¯¥é¥¹¤ò³èÍѤ·¤Æ¥»¡¼¥Ö¤È¥í¡¼¥É¤ò¹Ô¤¦½èÍý¤Ë¥ê¥Õ¥¡¥¯¥¿¥ê¥ó¥°¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡GameData ¥¯¥é¥¹Æâ¤ËÆþ¤ì»Ò¥¯¥é¥¹¤È¤·¤Æ¡¢¥»¡¼¥Ö¤·¤¿¤¤¾ðÊó¤ò¤Þ¤È¤á¤ë¤¿¤á¤Î¥¯¥é¥¹¤òºîÀ®¤·¡¢¥»¡¼¥Ö¤¹¤ëÁ°¤Ë new ¤·¤Æ¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òºîÀ®¤·¤Þ¤¹¡£
(Æþ¤ì»Ò¥¯¥é¥¹¤Ç¤Ï¤Ê¤¯¡¢£±¤Ä¤Î¥¯¥é¥¹¤È¤·¤ÆºîÀ®¤·¤Æ¤â¹½¤¤¤Þ¤»¤ó)
¤½¤ÎºÝ¤Ë¡¢¥¯¥ê¥¢¥Ý¥¤¥ó¥È¡¢¥¯¥ê¥¢¤·¤¿¥¹¥Æ¡¼¥¸¤Î¾ðÊó¡¢½ê»ý¤·¤Æ¤¤¤ëÉð´ï¤Î¾ðÊó¤Ê¤É¤Î¡¢¥»¡¼¥Ö¤·¤Æ¤ª¤¤¿¤¤¾ðÊó¤ò¥¯¥é¥¹Æâ¤ËÀßÄꤷ¡¢¤½¤ì¤ò°ì³ç¤Ç¥»¡¼¥Ö¤¹¤ëÂоݤȤ·¤Þ¤¹¡£
¡¡¥í¡¼¥É¤âƱÍͤǡ¢¥»¡¼¥Ö¤·¤Æ¤ª¤¤¿¤¤¾ðÊó¤Î¥¯¥é¥¹¤È¤·¤Æ¥í¡¼¥É¤ò¹Ô¤¤¡¢¤½¤Î¸å¡¢¥¯¥é¥¹Æâ¤Ë¤¢¤ë¥¯¥ê¥¢¥Ý¥¤¥ó¥È¤Ê¤É¤ÎÃͤò³ÆÊÑ¿ô¤ËÂåÆþ¤·¤ÆÀßÄꤷ¤Þ¤¹¡£
¡¡¥á¥½¥Ã¥ÉÆâ¤Ë¤Ï¡¢½¤¾þ»Ò¤ò»ý¤¿¤Ê¤¤¥á¥½¥Ã¥É¤òÆþ¤ì»Ò¤È¤·¤ÆÀë¸À(ºîÀ®)¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
¤³¤Î¤è¤¦¤Ê Æþ¤ì»Ò¤Ë¤Ê¤Ã¤Æ¤¤¤ë¥×¥é¥¤¥Ù¡¼¥È¤Ê¥á¥½¥Ã¥É¤ò¥í¡¼¥«¥ë´Ø¿ô ¤È¤¤¤¤¤Þ¤¹¡£
¡ã»²¹Í¥µ¥¤¥È¡ä
MicroSoft
¥í¡¼¥«¥ë´Ø¿ô(C# ¥×¥í¥°¥é¥ß¥ó¥° ¥¬¥¤¥É)
https://docs.microsoft.com/ja-jp/dotnet/csharp/pro...
¡¡¥í¡¼¥«¥ë´Ø¿ô¤Ï¡¢Æþ¤ì»Ò¤È¤·¤ÆÀë¸À¤·¤Æ¤¤¤ë¥á¥½¥Ã¥É(¿Æ¥á¥½¥Ã¥É)Æâ¤Ç¤Î¤ß¡¢¸Æ¤Ó½Ð¤·¤ÎÌ¿Î᤬²Äǽ¤Ç¤¹¡£
¡¡ÍøÍѤ¹¤ë¼ç¤Ê¥±¡¼¥¹¤È¤·¤Æ¤Ï¡¢¥¯¥é¥¹Æâ¤Ç¤Î¸Æ¤Ó½Ð¤·Ì¿Î᤬£±¤Ä¤Ç¤¢¤ë¥á¥½¥Ã¥É(£±²Õ½ê¤«¤é¤·¤«¸Æ¤Ó½Ð¤·Ì¿Î᤬¤Ê¤¤¥á¥½¥Ã¥É)¤¬¥í¡¼¥«¥ë´Ø¿ô¤È¤·¤ÆÀë¸À¤¹¤ë¥á¥½¥Ã¥É¤ÎÂоݤȤʤê¤Þ¤¹¡£
¤Þ¤¿¡¢¥í¡¼¥«¥ë´Ø¿ô¤Ï½èÍý¤ò±£Ê乤뤳¤È¤Ë¤â¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¢Ä̾ï¤Î¥á¥½¥Ã¥É¤è¤ê¤âÆâÉôŪ¤Ê½èÍý¤òµ½Ò¤¹¤ë¤³¤È¤¬¤Ç¤¡¢¥¹¥³¡¼¥×¤¬Ã»¤¯¤Ê¤ë¤³¤È¤Ç¡¢¥¨¥é¡¼¤ÎÆÃÄ꤬ÁᤤÃʳ¬¤ÇȽÃǤǤ¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
¡¡º£²ó¤Ï¡¢Initialize ¥á¥½¥Ã¥É¤ò Awake ¥á¥½¥Ã¥ÉÆâ¤ËÀë¸À¤·¤ÆºîÀ®¤·¤Æ¤¤¤Þ¤¹¡£
¤Ä¤Þ¤ê¡¢Awake ¥á¥½¥Ã¥É¤¬¿Æ¥á¥½¥Ã¥É¡¢Initialize ¥á¥½¥Ã¥É¤¬Æþ¤ì»Ò¥á¥½¥Ã¥É¤Ç¤¹¡£
¤½¤Î¤¿¤á¡¢¤³¤Î Initialize ¥á¥½¥Ã¥É¤Ï¡¢Awake ¥á¥½¥Ã¥ÉÆ⤫¤é¤Î¤ß¡¢¸Æ¤Ó½Ð¤·Ì¿Îá¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
¡¡ËÜÍè Initialize ¥á¥½¥Ã¥É¤Ï¡¢ÉáÄ̤Υ᥽¥Ã¥É¤Î¤è¤¦¤Ëµ½Ò¤Ç¤¤Þ¤¹¤¬¡¢¤¹¤Ù¤Æ¤Î½èÍý¤ò½ñ¤¤¤Æ¤«¤éÀººº¤·¤¿ºÝ¡¢
¸Æ¤Ó½Ð¤·Ì¿Î᤬ Awake ¥á¥½¥Ã¥É¤«¤é¤·¤«¤Ê¤¤¤¿¤á¡¢¥í¡¼¥«¥ë´Ø¿ô¤È¤·¤ÆÀë¸À¤·¤Æ¤¤¤Þ¤¹¡£
¡¡¥í¡¼¥«¥ë´Ø¿ô¤Ï¡¢¸Æ¤Ó½Ð¤·Ì¿Îá¤È¡¢´Ø¿ô¤òÀë¸À¤·¤Æ¤¤¤ë¾ì½ê¤¬Æ±¤¸¥á¥½¥Ã¥ÉÆâ¤Ë¤¢¤ë¤¿¤á¡¢
¤è¤ê½èÍý¤ò¥³¥ó¥Ñ¥¯¥È¤Ë¤Þ¤È¤á¤Æ¡¢¥¹¥³¡¼¥×¤ò¶¹¤¯¤¹¤ë¤³¤È¤Ç¡¢¸«¤ä¤¹¤¯¡¢´ÉÍý¤·¤ä¤¹¤¤¥á¥½¥Ã¥É¤È¤·¤Æµ¡Ç½¤·¤Æ¤¤¤Þ¤¹¡£
¡ã¥í¡¼¥«¥ë´Ø¿ô¡ä
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } //¥æ¡¼¥¶¡¼¥Ç¡¼¥¿¤Î½é´ü²½(¸Æ¤Ó½Ð¤·Ì¿Îá¤Î¤¹¤°²¼¤Ë¡¢¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤¤ë¥í¡¼¥«¥ë´Ø¿ô¤¬¤¢¤ë¤Î¤Ç¡¢½èÍý¤¬Äɤ¤¤ä¤¹¤¤) Initialize(); // ¥æ¡¼¥¶¡¼¥Ç¡¼¥¿¤Î½é´ü²½ÍÑ¤Î¥í¡¼¥«¥ë´Ø¿ô void Initialize() { // SaveData ¤¬¥»¡¼¥Ö¤µ¤ì¤Æ¤¤¤ë¤«³Îǧ if (PlayerPrefsHelper.ExistsData(SAVE_KEY)) { // ¥»¡¼¥Ö¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Î¤ß¥í¡¼¥É GetSaveData(); } else { // ¥»¡¼¥Ö¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð½é´üÃÍÀßÄê totalClearPoint = 0; if (!clearStageNoList.Contains(0)) { clearStageNoList.Add(0); } if (!weaponDatasList.Contains(0)) { weaponDatasList.Add(0); } } } }
¡¡¥»¡¼¥Ö¡¦¥í¡¼¥É½èÍý¤Î¥ê¥Õ¥¡¥¯¥¿¥ê¥ó¥°¤¬½ªÎ»¤·¤Þ¤·¤¿¤Î¤Ç¡¢¥²¡¼¥à¤ò¼Â¹Ô¤·¤Æ¡¢¥»¡¼¥Ö¡¦¥í¡¼¥É¤ò¹Ô¤Ã¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
¤¤¤Þ¤Þ¤Ç¤ÈƱ¤¸¤è¤¦¤Ë¥»¡¼¥Ö¡¦¥í¡¼¥É¤¬¹Ô¤ï¤ì¤Æ¤¤¤ì¤Ð¡¢¥ê¥Õ¥¡¥¯¥¿¥ê¥ó¥°¤ÏÀ®¸ù¤Ç¤¹¡£
¡¡
¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£
¡¡¼¡¤Ï¡¡È¯Å¸£²£µ¡¡¡¼¾È½à´ïµ¡Ç½¤ÎÄɲáݡ¡¤Ç¤¹¡£
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- ¥×¥í¥°¥é¥ß¥ó¥°
¥³¥á¥ó¥È¤ò¤«¤¯