Repository URL to install this package:
Version:
1.0.0 ▾
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Fluctio.FluctioSim.Common.Icons;
using UnityEngine;
namespace Fluctio.FluctioSim.EditorCore.Dependencies
{
public record DependencyState(DependencyStateType StateType, string Text)
{
public List<Action> Actions { get; } = new();
public Texture2D Icon => StateType switch
{
DependencyStateType.Ok => DefinedIcons.DependencyOk,
DependencyStateType.Loading => DefinedIcons.DependencyLoading,
DependencyStateType.Problem => DefinedIcons.DependencyProblem,
_ => throw new InvalidEnumArgumentException(nameof(StateType), (int)StateType, StateType.GetType())
};
}
public enum DependencyStateType
{
Ok,
Loading,
Problem,
}
}