private void LoadBulletData()
    {
        if (_equipmentEditor == null)
        {
            _equipmentEditor = gameObject.AddComponent <EquipmentEditor>();
        }

        _equipmentEditor.Load();

        for (int i = 0; i < 5; ++i)
        {
            _bulletEditor._bulletData._name = _equipmentEditor._equipmentData.bullets[i];
            _bulletEditor.Load();
            _createBullet.SetBulletData(_bulletEditor._bulletData);
            _createBullet._poolObjectsToList = _player.Find("Gun").transform.GetChild(i).GetComponent <PoolObjectsToList>();
            _createBullet.Generate();
        }
    }
Esempio n. 2
0
 public void OnRateXChanged(string str)
 {
     _bulletEditor._bulletData.rateX = int.Parse(str);
     _createBullet.SetBulletData(_bulletEditor._bulletData);
     _createBullet.Generate();
 }