BITFALL/Assets/Artists/Scripts/CosmeticInventory/AssetableCosmetic.cs

41 lines
1.3 KiB
C#
Raw Normal View History

2023-11-02 20:58:55 +08:00
using System;
using System.Collections;
using System.Collections.Generic;
2024-03-18 21:47:41 +08:00
using BITKit.Modification;
2023-11-02 20:58:55 +08:00
using UnityEngine;
// ReSharper disable ConvertToAutoProperty
namespace BITFALL.Cosmetic
{
[Serializable]
public struct CosmeticTextureContent:ICosmeticContent
{
[SerializeField] private Texture texture;
public Texture Texture => texture;
}
2024-03-18 21:47:41 +08:00
[Serializable]
public struct CosmeticModelContent:ICosmeticContent
{
[SerializeField] private GameObject model;
public GameObject Model => model;
}
2023-11-02 20:58:55 +08:00
public class AssetableCosmetic : ScriptableObject,ICosmetic
{
[SerializeField] private ulong id;
[SerializeField] private string addressablePath;
[SerializeField] private Sprite icon;
[SerializeReference, SubclassSelector] private ICosmeticType type;
[SerializeReference, SubclassSelector] private ICosmeticContent[] contents;
2024-03-18 21:47:41 +08:00
[SerializeReference, SubclassSelector] private IModifyElement[] require;
[SerializeReference, SubclassSelector] private IModifyElement[] incompatible;
2024-03-18 18:20:23 +08:00
public Sprite Icon => icon;
2023-11-02 20:58:55 +08:00
public string AddressablePath=> addressablePath;
public ulong Id => id;
public ICosmeticType Type=> type;
public ICosmeticContent[] Contents=> contents;
2024-03-18 21:47:41 +08:00
public IModifyElement[] Require=> require;
public IModifyElement[] Incompatible=> incompatible;
2023-11-02 20:58:55 +08:00
}
}