CangJie/Assets/Scripts//绳结/KnotMediator.cs
Roman 4218cd5c99 任务:搭建场景3
1.制作场景1玩家交互绳结动画逻辑
(1.为玩家操控基类添加触发动作函数

2.制作场景1黄帝动画

3.引入了以前写的播片系统

好像不能摸鱼了,明天写播片,下班了喵😿
2022-04-01 23:05:52 +08:00

40 lines
1009 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][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;
}
}