using System.Collections; using System.Collections.Generic; using UnityEngine; using Sirenix.OdinInspector; /// /// 绳结中介者,负责交流皇帝、玩家、绳结的信息 /// public class KnotMediator : UnitySingleton { public enum KnotType { None, 带毛刺的绳结, 编成麻花的绳结, 有鸡毛的绳结 } /// /// 当前记录的绳结类型 /// [Header("当前记录的绳结类型")][SerializeField][EnumPaging] private KnotType currentKnotType; private Player player; void Start(){ player = FindObjectOfType(); } public void RecordKnotType(KnotType knotType) { currentKnotType = knotType; //让仓颉做出查看绳结的动作 player.StopInputTo(2f); player.Behavior("查看绳结"); } /// /// 有黄帝调用,检查当前记录的和需要的绳结类型是否一致 /// /// 黄帝需要的绳结类型 /// public bool CheckKnotType(KnotType knotType) { return knotType == currentKnotType; } }