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

¡¡ºÇ¸å¤Î¥»¡¼¥Ö¡¦¥í¡¼¥É¤Î¼ê½ç¤Ë¤Ê¤ê¤Þ¤¹¡£

¡¡¤¿¤À¤·¡¢¤¹¤Ç¤Ë¥»¡¼¥Ö¡¦¥í¡¼¥É¤¬É¬ÍפʾðÊó¤Ë´Ø¤·¤Æ¤Îµ¡Ç½¼«ÂΤϴ°À®¤·¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¤³¤Î¼ê½ç¤Ç¤ÏÁ°²ó¤Î¼ê½ç¤È¹ç¤ï¤»¤Æ¡¢¤µ¤é¤Ë¥ï¥ó¥é¥ó¥¯¾å¤Î±þÍѽèÍý¤Î¼ÂÁõ¤òÌÜɸ¤È¤·¤Æ¤¤¤Þ¤¹ ¡£
¤è¤Ã¤Æ ¥¹¥¯¥ê¥×¥È¤ò¸«Ä¾¤·¤Æ¥ê¥Õ¥¡¥¯¥¿¥ê¥ó¥°¤¹¤ëÆâÍÆ ¤Ë¤Ê¤ê¤Þ¤¹¡£¤½¤Î¤¿¤á¡¢Æñ¤·¤¤½èÍý¤¬Â¿¤¯½Ð¤Æ¤­¤Þ¤¹¤Î¤Ç¡¢¤¤¤Þ¤¹¤°¤Ë¼ÂÁõ¤ò¹Ô¤ï¤Ê¤¯¤Æ¤âÌäÂꤢ¤ê¤Þ¤»¤ó ¡£



ȯŸ£²£´ ¡¼¥»¡¼¥Ö¡¦¥í¡¼¥Éµ¡Ç½¤Î¼ÂÁõ­¤¡¼

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

¡¡¡¦¥í¡¼¥«¥ë´Ø¿ô



£±¡¥Àß·×


¡¡Àè¤Û¤É¤Î¼ê½ç¤ÇºîÀ®¤·¤¿ PlayerPrefsHelper ¥¯¥é¥¹¤ò³èÍѤ·¡¢¥»¡¼¥ÖÍѤξðÊó¤ò£±¤Ä¤Î¥¯¥é¥¹¤È¤·¤Æ´ÉÍý¤·¡¢
¤½¤ì¤ò JsonUtility ¥¯¥é¥¹¤ò³èÍѤ·¤Æ¥»¡¼¥Ö¤È¥í¡¼¥É¤ò¹Ô¤¦½èÍý¤Ë¥ê¥Õ¥¡¥¯¥¿¥ê¥ó¥°¤ò¹Ô¤¤¤Þ¤¹¡£

¡¡GameData ¥¯¥é¥¹Æâ¤ËÆþ¤ì»Ò¥¯¥é¥¹¤È¤·¤Æ¡¢¥»¡¼¥Ö¤·¤¿¤¤¾ðÊó¤ò¤Þ¤È¤á¤ë¤¿¤á¤Î¥¯¥é¥¹¤òºîÀ®¤·¡¢¥»¡¼¥Ö¤¹¤ëÁ°¤Ë new ¤·¤Æ¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òºîÀ®¤·¤Þ¤¹¡£
(Æþ¤ì»Ò¥¯¥é¥¹¤Ç¤Ï¤Ê¤¯¡¢£±¤Ä¤Î¥¯¥é¥¹¤È¤·¤ÆºîÀ®¤·¤Æ¤â¹½¤¤¤Þ¤»¤ó)
¤½¤ÎºÝ¤Ë¡¢¥¯¥ê¥¢¥Ý¥¤¥ó¥È¡¢¥¯¥ê¥¢¤·¤¿¥¹¥Æ¡¼¥¸¤Î¾ðÊó¡¢½ê»ý¤·¤Æ¤¤¤ëÉð´ï¤Î¾ðÊó¤Ê¤É¤Î¡¢¥»¡¼¥Ö¤·¤Æ¤ª¤­¤¿¤¤¾ðÊó¤ò¥¯¥é¥¹Æâ¤ËÀßÄꤷ¡¢¤½¤ì¤ò°ì³ç¤Ç¥»¡¼¥Ö¤¹¤ëÂоݤȤ·¤Þ¤¹¡£

¡¡¥í¡¼¥É¤âƱÍͤǡ¢¥»¡¼¥Ö¤·¤Æ¤ª¤­¤¿¤¤¾ðÊó¤Î¥¯¥é¥¹¤È¤·¤Æ¥í¡¼¥É¤ò¹Ô¤¤¡¢¤½¤Î¸å¡¢¥¯¥é¥¹Æâ¤Ë¤¢¤ë¥¯¥ê¥¢¥Ý¥¤¥ó¥È¤Ê¤É¤ÎÃͤò³ÆÊÑ¿ô¤ËÂåÆþ¤·¤ÆÀßÄꤷ¤Þ¤¹¡£


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


¡¡´û¸¤Î¥»¡¼¥Ö¡¦¥í¡¼¥É´ØÏ¢¤Î½èÍý¤ò¥³¥á¥ó¥È¥¢¥¦¥È¤·¤Æ¡¢¿·¤·¤¤½èÍý¤Ë½ñ¤­Âؤ¨¤Þ¤¹¡£
½¤Àµ²Õ½ê¤äÄɲ乤ë²Õ½ê¡¢¿·¤·¤¤½èÍý¤¬Â¿¤¤¤Î¤Ç¡¢¤æ¤Ã¤¯¤ê¤È¡¢½èÍý¤ÎÆâÍƤòÍý²ò¤·¤Ê¤¬¤é¿Ê¤á¤Þ¤·¤ç¤¦¡£


GameData.cs

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


¡¡¥¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¤¿¤é¥»¡¼¥Ö¤ò¹Ô¤¤¤Þ¤¹¡£


£³¡¥¡ã¥í¡¼¥«¥ë´Ø¿ô¡ä


¡¡¥á¥½¥Ã¥ÉÆâ¤Ë¤Ï¡¢½¤¾þ»Ò¤ò»ý¤¿¤Ê¤¤¥á¥½¥Ã¥É¤òÆþ¤ì»Ò¤È¤·¤ÆÀë¸À(ºîÀ®)¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
¤³¤Î¤è¤¦¤Ê Æþ¤ì»Ò¤Ë¤Ê¤Ã¤Æ¤¤¤ë¥×¥é¥¤¥Ù¡¼¥È¤Ê¥á¥½¥Ã¥É¤ò¥í¡¼¥«¥ë´Ø¿ô ¤È¤¤¤¤¤Þ¤¹¡£

¡ã»²¹Í¥µ¥¤¥È¡ä
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);
            }
        }
    }
}


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


¡¡¥»¡¼¥Ö¡¦¥í¡¼¥É½èÍý¤Î¥ê¥Õ¥¡¥¯¥¿¥ê¥ó¥°¤¬½ªÎ»¤·¤Þ¤·¤¿¤Î¤Ç¡¢¥²¡¼¥à¤ò¼Â¹Ô¤·¤Æ¡¢¥»¡¼¥Ö¡¦¥í¡¼¥É¤ò¹Ô¤Ã¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
¤¤¤Þ¤Þ¤Ç¤ÈƱ¤¸¤è¤¦¤Ë¥»¡¼¥Ö¡¦¥í¡¼¥É¤¬¹Ô¤ï¤ì¤Æ¤¤¤ì¤Ð¡¢¥ê¥Õ¥¡¥¯¥¿¥ê¥ó¥°¤ÏÀ®¸ù¤Ç¤¹¡£
¡¡


¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£

¡¡¼¡¤Ï¡¡È¯Å¸£²£µ¡¡¡¼¾È½à´ïµ¡Ç½¤ÎÄɲáݡ¡¤Ç¤¹¡£

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


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

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

Menu


´ðÁÃ

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

private



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

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