public void OnReleaseEnergyButton() { if (_powerGauge.GetPowerLevel() != 0) { _particleSystem.Emit(200); } _powerGauge.ReleaseEnergy(10000); }
void Start() { _r = _spriteRenderer.color.r; _g = _spriteRenderer.color.g; _b = _spriteRenderer.color.b; _solidColor = new Color(_r, _g, _b, 1); _transparentColor = new Color(_r, _g, _b, 0.4f); if (_powerGauge.GetPowerLevel() == 0) { _collider.enabled = true; _spriteRenderer.color = _solidColor; } else { _collider.enabled = false; _spriteRenderer.color = _transparentColor; } }