コード例 #1
0
    private void Awake()
    {
        savePath   = Path.Combine(Application.persistentDataPath, "saveFile");
        royStats   = GameObject.Find("Set_PlayerRoy").GetComponent <Roy>();
        klunkStats = GameObject.Find("Set_KLUNK").GetComponent <Klunk>();

        if (File.Exists(savePath))
        {
            Vector2[] stats = LoadStats();
            royStats.SetCurrentHpSp(stats[0]);
            klunkStats.SetCurrentHpSp(stats[1]);
        }
    }