CangJie/Assets/Scripts//KnotMediator.cs
2022-03-13 23:27:31 +08:00

40 lines
1019 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Sirenix.OdinInspector;
/// <summary>
/// 绳结中介者,负责交流皇帝、玩家、绳结的信息
/// </summary>
public class KnotMediator : UnitySingleton<KnotMediator>
{
public enum KnotType
{
None,
,
,
}
/// <summary>
/// 当前记录的绳结类型
/// </summary>
[Header("当前记录的绳结类型")][SerializeField][ReadOnly][EnumPaging]
private KnotType currentKnotType;
public void RecordKnotType(KnotType knotType)
{
currentKnotType = knotType;
}
/// <summary>
/// 有黄帝调用,检查当前记录的和需要的绳结类型是否一致
/// </summary>
/// <param name="knotType">黄帝需要的绳结类型</param>
/// <returns></returns>
public bool CheckKnotType(KnotType knotType)
{
return knotType == currentKnotType;
}
}