コード例 #1
0
 private void OnEnable()
 {
     if (Started & !EnemyWeapon)
     {
         ammoDisplay.Setup(ammoCapacity, currentAmmoCount);
     }
 }
コード例 #2
0
    private void VariableSetup()
    {
        _thrustersObject.SetActive(false);
        _shieldVisual.SetActive(false);
        _speedVisual.SetActive(false);
        transform.position     = new Vector3(0, 0, 0);
        _originalSpeed         = _speed;
        thrustersCurrentCharge = _thrustersMaxCharge;
        _currentAmmo           = _maxAmmo;
        _lives          = _livesMax;
        _shieldStrength = _maxShieldStrength;

        _nums = new List <int>(_engines.Length);

        for (int i = 0; i < _engines.Length; i++)
        {
            _nums.Add(i);
        }

        if (_ammoDisplay != null)
        {
            _ammoDisplay.Setup(_maxAmmo);
        }
    }