Beispiel #1
0
    // Start is called before the first frame update
    void Start()
    {
        foreach (object key in ES3.GetKeys())
        {
            Debug.Log(key);


            // Last save date and time recall



            // Differential data recall



            // These data set to json



            // json uploads


            //
        }
    }
Beispiel #2
0
 public void RemoveAllSettings()
 {
     string[] keys = ES3.GetKeys();
     for (int i = 0; i < keys.Length; i++)
     {
         ES3.DeleteKey(keys[i]);
     }
 }
Beispiel #3
0
    public void ReturnLobby()
    {
        if (ES3.FileExists("WeaponList.es3"))
        {
            var keys = ES3.GetKeys("WeaponList.es3");
            for (int i = 0; i < keys.Length; i++)
            {
                if (ES3.KeyExists(i.ToString(), "WeaponList.es3"))
                {
                    ES3.DeleteKey(i.ToString(), "WeaponList.es3");
                }
            }
        }

        if (this.weaponParent == null)
        {
            this.weaponParent = GameObject.Find("GunSlot").transform;
        }

        weaponList.Clear();
        GameObject weaponObj;
        CWeapon    weapon;

        if (ES3.KeyExists("BaseGun", "Weapon.es3"))
        {
            string weaponName = ES3.Load <string>("BaseGun", "Weapon.es3");
            weaponObj = GameObject.Instantiate(CResourceManager.Instance.GetObjectForKey("Prefabs/Gun/" +
                                                                                         weaponName), this.weaponParent);

            weapon         = weaponObj.GetComponent <CWeapon>();
            weapon.gunName = weaponName;
        }

        else
        {
            weaponObj      = GameObject.Instantiate(CResourceManager.Instance.GetObjectForKey("Prefabs/Gun/DAKGUN"), this.weaponParent);
            weapon         = weaponObj.GetComponent <CWeapon>();
            weapon.gunName = "DAKGUN";
        }


        weapon.SetGunImageSetting();
        bulletArray[0] = weapon.GetMaxBullet();
        for (int i = 1; i < bulletArray.Length; i++)
        {
            bulletArray[i] = -1;
        }

        if (this.weaponParent == null)
        {
            this.weaponParent = GameObject.Find("GunSlot").transform;
        }

        this.SetCurrentWeapon(weapon);
        this.AddWeapon(weapon);
        ES3.Save <int>("CurrentWeaponIndex", this.currentWeaponIndex, "Weapon.es3");
        ES3.Save <string>("BaseGun", weapon.gunName, "Weapon.es3");
    }
Beispiel #4
0
        /// <summary>
        /// 全セーブデータ削除
        /// </summary>
        public static void DeleteAllSaveData()
        {
            var keys = ES3.GetKeys()
                       .ToList();

            keys.ForEach(key => ES3.DeleteKey(key));

            MainUIManager.I.ShowAnnounceMessage("全セーブデータを削除\nしました。(再起動後有効)", 2);
        }
Beispiel #5
0
    public void NewGame()
    {
        PlayerPrefs.DeleteAll();
        foreach (var key in ES3.GetKeys())
        {
            ES3.DeleteKey(key);
        }

        tutorialQuests.SetQuests(defaultTutorialQuests);
        quests.SetQuests(defaultQuests);
        NewGameEvent.Invoke();
    }
Beispiel #6
0
    public void LoadWeaponList()
    {
        if (this.weaponParent == null)
        {
            this.weaponParent = GameObject.Find("GunSlot").transform;
        }

        bool isExist = ES3.FileExists("WeaponList.es3");

        if (isExist)
        {
            var keys = ES3.GetKeys("WeaponList.es3");
            bulletArray = ES3.Load <int[]>("BulletCount", "Weapon.es3");

            if (keys.Length != 0)
            {
                for (int i = keys.Length - 1; i >= 0; i--)
                {
                    string     gunName   = ES3.Load <string>(keys[i], "WeaponList.es3");
                    GameObject weaponObj = GameObject.Instantiate(CResourceManager.Instance.GetObjectForKey("Prefabs/Gun/" +
                                                                                                            gunName), this.weaponParent);
                    var weapon = weaponObj.GetComponent <CWeapon>();
                    weapon.gunName = gunName;
                    weapon.SetGunImageSetting();
                    this.SetCurrentWeapon(weapon);
                    this.AddWeapon(weapon);
                }

                this.currentWeaponIndex = ES3.Load <int>("CurrentWeaponIndex", "Weapon.es3");
                this.ChangeWeapon(this.currentWeaponIndex);
            }
        }

        else
        {
            //베이스건으로 놓아야함.
            GameObject weaponObj = GameObject.Instantiate(CResourceManager.Instance.GetObjectForKey("Prefabs/Gun/DAKGUN"), this.weaponParent);
            var        weapon    = weaponObj.GetComponent <CWeapon>();
            weapon.gunName = "DAKGUN";
            weapon.SetGunImageSetting();
            for (int i = 0; i < bulletArray.Length; i++)
            {
                bulletArray[i] = -1;
            }
            this.SetCurrentWeapon(weapon);
            this.AddWeapon(weapon);
            this.currentWeaponIndex = 0;
            ES3.Save <int>("CurrentWeaponIndex", this.currentWeaponIndex, "Weapon.es3");
        }
    }
Beispiel #7
0
    void LoadEntireFile()
    {
        string saveDir;

        if (Get().TryGetSaveFileDirectory(out saveDir))
        {
            Debug.Log("Directory: " + saveDir);

            foreach (var key in ES3.GetKeys(saveDir))
            {
                Debug.Log(key);
            }
        }
    }
Beispiel #8
0
 public override void Enter()
 {
     keyCount.Value = ES3.GetKeys(filePath.Value, GetSettings()).Length;
 }
Beispiel #9
0
 public override void Enter()
 {
     keys.Values = ES3.GetKeys(filePath.Value, GetSettings());
     keys.SaveChanges();
 }
Beispiel #10
0
 public string[] Keys()
 {
     return(ES3.GetKeys());
 }
Beispiel #11
0
    /// <summary>
    /// 復号化を介して、SaveDataからTempDataを作成。
    /// </summary>
    static void CreateTempData()
    {
        var keys = ES3.GetKeys(SaveSettings);

        TempData = keys.ToDictionary(key => key, key => ES3.Load <dynamic> (key, SaveSettings));
    }