mirror of
https://github.com/Bragin-Stepan/project-entity.git
synced 2026-03-05 07:41:10 +00:00
init: add project
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _Project.Develop.Runtime.Logic.Meta.Features.Wallet;
|
||||
using UnityEngine;
|
||||
|
||||
namespace _Project.Develop.Runtime.Configs.Meta
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Configs/Meta/Wallet/NewCurrencyIconsConfig", fileName = "CurrencyIconsConfig")]
|
||||
public class CurrencyIconsConfigSO : ScriptableObject
|
||||
{
|
||||
[SerializeField] private List<CurrencyConfig> _configs;
|
||||
|
||||
public Sprite GetSpriteFor(CurrencyTypes currencyType)
|
||||
=> _configs.First(config => config.Type == currencyType).Sprite;
|
||||
|
||||
[Serializable]
|
||||
private class CurrencyConfig
|
||||
{
|
||||
[field: SerializeField] public CurrencyTypes Type { get; private set; }
|
||||
[field: SerializeField] public Sprite Sprite { get; private set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user