# Currency Manager
The Currency Manager is a versatile and customizable tool for managing multiple in-game currencies in Unity. Simplify the implementation of game economies in RPGs, strategy, and simulation games. Add, subtract, and exchange currencies while tracking balances. Manage currency balances across your game with ease, and export and import using JSON for save purposes.

## Features

- Manage multiple currencies
- Add, subtract, and get the balance of individual currencies
- Perform currency exchanges with customizable exchange rates
- Easy-to-use Unity editor integration with ScriptableObjects
- Transaction history for each transaction type
- Get and set currency balances and transactions using a JSON file for save purposes
- Receive events for currency add, subtract, and exchange actions

## Installation

1. Download the Currency Manager Unity package.
2. Open your Unity project.
3. Navigate to Assets > Import Package > Custom Package.
4. Select the downloaded Currency Manager Unity package file and click Open.
5. In the Import Unity Package window, click Import.

## Usage

1. Create Currency assets by navigating to Assets > Create > FaelanGames > Currency. Set the currency name, symbol and exchange rate to the base currency for each created Currency asset.
2. Add the Wallet component to a GameObject in your scene.
3. Use the WalletDemo script as a reference for how to interact with the Wallet component in your game logic.

## Example

A simple example of how to use the Currency Manager:

```csharp
// Add 100 units of currency1 and 200 units of currency2 to the wallet
wallet.AddCurrency(currency1, 100);
wallet.AddCurrency(currency2, 200);

// Subtract 50 units of currency1 and 150 units of currency2 from the wallet
wallet.SubtractCurrency(currency1, 50);
wallet.SubtractCurrency(currency2, 150);

// Exchange 500 units of currency1 to currency2
wallet.ExchangeCurrency(currency1, currency2, 500);
```

## Support
If you encounter any issues or have questions, please open an issue on the GitHub repository or contact the developer directly.

## License
This project is licensed under the MIT License - see the LICENSE file for details.