2022-03-13 21:40:55 +08:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using Sirenix.OdinInspector;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 皇帝类,控制皇帝的行为,继承自可交互物体
|
|
|
|
/// </summary>
|
2022-03-19 22:52:00 +08:00
|
|
|
public class HuangDi : EntryTrigger
|
2022-03-13 21:40:55 +08:00
|
|
|
{
|
|
|
|
[SerializeField][EnumPaging]
|
|
|
|
private KnotMediator.KnotType neededType = KnotMediator.KnotType.None;
|
2022-03-19 22:52:00 +08:00
|
|
|
[Header("是否已经完成了对话")]
|
|
|
|
public bool hasFinishTheConversation = false;
|
2022-03-13 21:40:55 +08:00
|
|
|
|
|
|
|
public override void OnCall()
|
|
|
|
{
|
2022-03-19 22:52:00 +08:00
|
|
|
if(hasFinishTheConversation){
|
|
|
|
if(KnotMediator.Instance.CheckKnotType(neededType))
|
|
|
|
{
|
|
|
|
Debug.Log("皇帝接受了绳结");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Debug.Log("皇帝拒绝了绳结");
|
|
|
|
}
|
2022-03-13 21:40:55 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-03-19 22:52:00 +08:00
|
|
|
ConversationController.Instance.OnCall("1");
|
2022-03-13 21:40:55 +08:00
|
|
|
}
|
2022-03-19 22:52:00 +08:00
|
|
|
|
2022-03-13 21:40:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setNeededType(KnotMediator.KnotType type)
|
|
|
|
{
|
|
|
|
neededType = type;
|
|
|
|
}
|
|
|
|
}
|