private void OnMouseDown() { if (_lootCrate.IsOpeningOrClosing()) { return; } if (_lootCrate.IsOpen()) { _lootCrate.Close(); } else { _lootCrate.Open(); } }
private void Update() { if (_lootCrate.IsOpeningOrClosing()) { return; } if (Input.GetKeyDown(openKey) && _lootCrate.IsClosed()) { _lootCrate.Open(); } if (Input.GetKeyDown(closeKey) && _lootCrate.IsOpen()) { _lootCrate.Close(); } }