2024-04-23 18:02:13 +08:00
|
|
|
|
using cfg.DialogueCfg;
|
2024-04-24 12:59:23 +08:00
|
|
|
|
using Cysharp.Threading.Tasks;
|
2024-04-23 18:02:13 +08:00
|
|
|
|
using Framework;
|
|
|
|
|
|
using Gameplay;
|
2024-06-13 15:41:51 +08:00
|
|
|
|
using Gameplay.Guide;
|
|
|
|
|
|
using Gameplay.Level;
|
2024-04-23 18:02:13 +08:00
|
|
|
|
using PhxhSDK;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2024-04-29 14:22:22 +08:00
|
|
|
|
using System.Linq;
|
2024-04-23 18:02:13 +08:00
|
|
|
|
using Random = UnityEngine.Random;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 台词管理器
|
|
|
|
|
|
/// </summary>
|
2024-06-13 15:41:51 +08:00
|
|
|
|
public class DialogueManager : Singlenton<DialogueManager>, IInitable, IUpdatable
|
2024-04-23 18:02:13 +08:00
|
|
|
|
{
|
2024-04-29 17:20:40 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 台词播放记录数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private class DialoguePlayData
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 台词对应次数字典
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public Dictionary<int, int> DicCount;
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 上一次日期
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public DateTime LastTime;
|
|
|
|
|
|
|
|
|
|
|
|
public DialoguePlayData()
|
|
|
|
|
|
{
|
|
|
|
|
|
DicCount = new();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void SetNewTime(DateTime dateTime)
|
|
|
|
|
|
{
|
|
|
|
|
|
LastTime = dateTime;
|
|
|
|
|
|
DicCount.Clear();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-06-11 17:54:57 +08:00
|
|
|
|
/// 实际语音id = 角色id * RATIO + 台词id
|
|
|
|
|
|
/// 实际台词文本key = "Dialogue_{实际语音id}"
|
2024-04-29 17:20:40 +08:00
|
|
|
|
/// </summary>
|
2024-06-11 17:54:57 +08:00
|
|
|
|
private const int RATIO = 1000;
|
2024-04-23 18:02:13 +08:00
|
|
|
|
/// <summary>
|
2024-06-11 17:54:57 +08:00
|
|
|
|
/// 台词播放记录数据key
|
2024-04-23 18:02:13 +08:00
|
|
|
|
/// </summary>
|
2024-06-11 17:54:57 +08:00
|
|
|
|
private const string DIALOGUE_PLAY_DATA = "Dialogue_Play_Data";
|
2024-04-23 18:10:19 +08:00
|
|
|
|
/// <summary>
|
2024-04-29 14:22:22 +08:00
|
|
|
|
/// 角色台词对应的权重字典,key:角色id,value: subKey:台词id,subValue:台词权重
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private Dictionary<int, Dictionary<int, float>> dicDialogueWeight;
|
|
|
|
|
|
/// <summary>
|
2024-06-12 13:11:09 +08:00
|
|
|
|
/// 台词数据字典字典,key:台词类型,value:台词配置数据列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private Dictionary<E_DialogueType, List<DataDialogueCfg>> dicDialogue;
|
|
|
|
|
|
/// <summary>
|
2024-04-29 17:20:40 +08:00
|
|
|
|
/// 台词播放记录数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private DialoguePlayData dialoguePlayData;
|
2024-06-12 15:49:31 +08:00
|
|
|
|
#region 战斗台词
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 当前播放的战斗台词
|
|
|
|
|
|
/// </summary>
|
2024-07-22 19:35:34 +08:00
|
|
|
|
private AudioInst curFightAudio;
|
2024-06-12 15:49:31 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 当前战斗台词优先级
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private int curFightDialoguePriority;
|
2024-06-13 15:41:51 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 当前战斗语音类型
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private E_DialogueType curFightDialogueType;
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 等待播放的获得增益buff语音,value:角色id
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private readonly Queue<int> queueWaitGetBuffDialogue = new();
|
2024-06-12 15:49:31 +08:00
|
|
|
|
#endregion
|
2024-06-12 13:11:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否初始化
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private bool isInit;
|
2024-04-23 18:02:13 +08:00
|
|
|
|
|
|
|
|
|
|
#region 临时数据
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 符合条件的台词数据
|
|
|
|
|
|
/// </summary>
|
2024-06-12 13:11:09 +08:00
|
|
|
|
private readonly List<DataDialogueCfg> listDialogueDataTemp = new();
|
2024-04-29 14:22:22 +08:00
|
|
|
|
private readonly List<float> listDialogueWeight = new();
|
2024-04-23 18:02:13 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
2024-06-13 15:41:51 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否正在播放战斗语音
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool IsPlayingFightDialogue
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return null != curFightAudio && curFightAudio.IsPlaying; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-04-23 18:02:13 +08:00
|
|
|
|
public void Init()
|
|
|
|
|
|
{
|
2024-06-12 13:11:09 +08:00
|
|
|
|
isInit = false;
|
|
|
|
|
|
|
2024-04-29 14:22:22 +08:00
|
|
|
|
dicDialogueWeight = new();
|
2024-04-29 17:20:40 +08:00
|
|
|
|
dialoguePlayData = StorageMgr.Instance.GetStorage<DialoguePlayData>(DIALOGUE_PLAY_DATA);
|
2024-06-12 13:11:09 +08:00
|
|
|
|
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.AllConfigLoad, OnInit);
|
2024-06-13 13:18:56 +08:00
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_SELF_RETREAT, (Action<int>)OnFightRetreat);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_SELECT_UNIT, (Action<int>)OnFightChoose);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_CLICK_MOVE, (Action<int>)OnFightMove);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_CLICK_ATTACK, (Action<int>)OnFightAttack);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_USE_SKILL, (Action<int>)OnFightUseSkill);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_UP_VEHICLE, (Action<int>)OnFightBoardVehicle);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_DOWN_VEHICLE, (Action<int>)OnFightLeaveVehicle);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_GET_P_BUFF, (Action<int>)OnFightGetBuff);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_KILL_ENEMY, (Action<int>)OnFightKillEnemy);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_LET_ENEMY_RETREAT, (Action<int>)OnFightRepelEnemy);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_BE_ATTACK_AND_HAS_SHEILD, (Action<int>)OnFightArmourDown);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_BE_ATTACK_AND_NO_SHEILD, (Action<int>)OnFightArmourBloodZero);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_BE_ATTACK_AND_DEAD, (Action<int>)OnFightKnockedDown);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_BE_ATTACK_AND_ENTER_LOW_MORALE, (Action<int>)OnFightStifleState);
|
|
|
|
|
|
EventManager.Instance.Register(EventManager.EventName.INFIGHT_AUDIO_BE_ATTACK_AND_ENTER_RETREAT, (Action<int>)OnFightRetreatState);
|
2024-04-23 18:02:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-13 15:41:51 +08:00
|
|
|
|
public void Update(float deltaTime)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (null == LevelManager.Instance.CurrentLevel)
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
if (!LevelManager.Instance.CurrentLevel.IsInBattle())
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
if (IsPlayingFightDialogue)
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
if (E_DialogueType.FightUseSkill != curFightDialogueType)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (queueWaitGetBuffDialogue.Count > 0)
|
|
|
|
|
|
queueWaitGetBuffDialogue.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
while (queueWaitGetBuffDialogue.TryDequeue(out int roleId))
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightGetBuff);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-04-23 18:02:13 +08:00
|
|
|
|
public void Release()
|
|
|
|
|
|
{
|
2024-06-13 13:18:56 +08:00
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_BE_ATTACK_AND_ENTER_RETREAT, (Action<int>)OnFightRetreatState);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_BE_ATTACK_AND_ENTER_LOW_MORALE, (Action<int>)OnFightStifleState);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_BE_ATTACK_AND_DEAD, (Action<int>)OnFightKnockedDown);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_BE_ATTACK_AND_NO_SHEILD, (Action<int>)OnFightArmourBloodZero);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_BE_ATTACK_AND_HAS_SHEILD, (Action<int>)OnFightArmourDown);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_LET_ENEMY_RETREAT, (Action<int>)OnFightRepelEnemy);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_KILL_ENEMY, (Action<int>)OnFightKillEnemy);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_GET_P_BUFF, (Action<int>)OnFightGetBuff);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_DOWN_VEHICLE, (Action<int>)OnFightLeaveVehicle);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_UP_VEHICLE, (Action<int>)OnFightBoardVehicle);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_USE_SKILL, (Action<int>)OnFightUseSkill);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_CLICK_ATTACK, (Action<int>)OnFightAttack);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_CLICK_MOVE, (Action<int>)OnFightMove);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_SELECT_UNIT, (Action<int>)OnFightChoose);
|
|
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_SELF_RETREAT, (Action<int>)OnFightRetreat);
|
2024-06-12 13:11:09 +08:00
|
|
|
|
EventManager.Instance.Unregister(EventManager.EventName.AllConfigLoad, OnInit);
|
|
|
|
|
|
|
|
|
|
|
|
listDialogueDataTemp.Clear();
|
2024-04-23 18:02:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 播放台词
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
/// <param name="dialogueType"></param>
|
2024-04-29 17:20:40 +08:00
|
|
|
|
/// <param name="callback"></param>
|
|
|
|
|
|
/// <returns></returns>
|
2024-07-22 19:35:34 +08:00
|
|
|
|
public async UniTask<AudioInst> PlayDiaogue(int roleId, E_DialogueType dialogueType, Action<string> callback = null)
|
2024-04-23 18:02:13 +08:00
|
|
|
|
{
|
2024-06-12 13:11:09 +08:00
|
|
|
|
if (!isInit)
|
|
|
|
|
|
{
|
|
|
|
|
|
DebugUtil.LogError("台词数据没有初始化");
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!dicDialogue.TryGetValue(dialogueType, out List<DataDialogueCfg> listDialogueData))
|
|
|
|
|
|
{
|
2024-07-09 13:09:07 +08:00
|
|
|
|
DebugUtil.LogWarning($"没有{dialogueType}类型的台词数据");
|
2024-06-12 13:11:09 +08:00
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-04-29 17:20:40 +08:00
|
|
|
|
#region 每日重置次数,后续应该通过跨天事件触发
|
|
|
|
|
|
DateTime curTime = CommonUtils.GetCurTime(CommonUtils.E_TimeType.Server);
|
|
|
|
|
|
if (curTime.Hour > TableManager.Instance.Tables.GlobalConfig.DailyChangeHour && // 超过5点
|
|
|
|
|
|
curTime.Day != dialoguePlayData.LastTime.Day) // 不是同一天
|
|
|
|
|
|
{
|
|
|
|
|
|
dialoguePlayData.SetNewTime(curTime);
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 获取需要播放的台词,根据优先级,台词类型,播放次数,条件
|
2024-06-12 13:11:09 +08:00
|
|
|
|
listDialogueDataTemp.Clear();
|
2024-04-24 12:59:23 +08:00
|
|
|
|
int minPriority = int.MaxValue; // 值越小优先级越高
|
2024-06-12 13:11:09 +08:00
|
|
|
|
foreach (DataDialogueCfg cfg in listDialogueData)
|
2024-04-23 18:02:13 +08:00
|
|
|
|
{
|
2024-04-24 12:59:23 +08:00
|
|
|
|
if (cfg.Priority > minPriority) // 优先级不足,排除
|
2024-04-23 18:02:13 +08:00
|
|
|
|
continue;
|
|
|
|
|
|
|
2024-04-29 17:20:40 +08:00
|
|
|
|
if (cfg.DayPlayCount > 0 && // 0表示无限次
|
2024-06-11 17:54:57 +08:00
|
|
|
|
dialoguePlayData.DicCount.TryGetValue(cfg.Id, out int count) &&
|
2024-04-29 17:20:40 +08:00
|
|
|
|
count >= cfg.DayPlayCount) // 超过播放次数
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
2024-04-23 18:02:13 +08:00
|
|
|
|
if (!IsCheckValid(roleId, cfg)) // 条件不满足,排除
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
2024-04-24 12:59:23 +08:00
|
|
|
|
if (cfg.Priority < minPriority)
|
2024-04-23 18:02:13 +08:00
|
|
|
|
{
|
2024-04-24 12:59:23 +08:00
|
|
|
|
minPriority = cfg.Priority;
|
2024-06-12 13:11:09 +08:00
|
|
|
|
listDialogueDataTemp.Clear();
|
2024-04-23 18:02:13 +08:00
|
|
|
|
}
|
2024-06-12 13:11:09 +08:00
|
|
|
|
listDialogueDataTemp.Add(cfg);
|
2024-04-23 18:02:13 +08:00
|
|
|
|
}
|
2024-04-24 12:59:23 +08:00
|
|
|
|
#endregion
|
2024-04-23 18:02:13 +08:00
|
|
|
|
|
2024-06-12 13:11:09 +08:00
|
|
|
|
if (listDialogueDataTemp.Count <= 0)
|
2024-04-23 18:02:13 +08:00
|
|
|
|
{
|
2024-07-09 13:09:07 +08:00
|
|
|
|
DebugUtil.LogWarning("没有满足条件要播放的台词");
|
2024-04-24 12:59:23 +08:00
|
|
|
|
return null;
|
2024-04-23 18:02:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-04-29 14:22:22 +08:00
|
|
|
|
#region 根据权重随机台词
|
|
|
|
|
|
DataDialogueCfg playCfg;
|
|
|
|
|
|
listDialogueWeight.Clear();
|
|
|
|
|
|
if (dicDialogueWeight.TryGetValue(roleId, out Dictionary<int, float> dicWeight))
|
|
|
|
|
|
{
|
2024-06-12 13:11:09 +08:00
|
|
|
|
foreach (DataDialogueCfg cfg in listDialogueDataTemp)
|
2024-04-29 14:22:22 +08:00
|
|
|
|
{
|
2024-06-11 17:54:57 +08:00
|
|
|
|
if (dicWeight.TryGetValue(cfg.Id, out float weight))
|
2024-04-29 14:22:22 +08:00
|
|
|
|
listDialogueWeight.Add(weight);
|
|
|
|
|
|
else
|
|
|
|
|
|
listDialogueWeight.Add(1f);
|
|
|
|
|
|
}
|
2024-06-12 13:11:09 +08:00
|
|
|
|
playCfg = listDialogueDataTemp[RandomIndexByWeight()];
|
2024-04-29 14:22:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
else
|
2024-06-12 13:11:09 +08:00
|
|
|
|
playCfg = listDialogueDataTemp[Random.Range(0, listDialogueDataTemp.Count)];
|
2024-04-29 14:22:22 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 设置其他的权重
|
|
|
|
|
|
if (dicWeight != null)
|
|
|
|
|
|
{
|
2024-06-12 13:11:09 +08:00
|
|
|
|
foreach (DataDialogueCfg cfg in listDialogueDataTemp)
|
2024-04-29 14:22:22 +08:00
|
|
|
|
{
|
2024-06-11 17:54:57 +08:00
|
|
|
|
if (dicWeight.TryGetValue(cfg.Id, out float weight) && weight <= 0f)
|
|
|
|
|
|
dicWeight[cfg.Id] = 0.3f; // TODO 需要全局配置
|
2024-04-29 14:22:22 +08:00
|
|
|
|
else
|
2024-06-11 17:54:57 +08:00
|
|
|
|
dicWeight[cfg.Id] = 1f;
|
2024-04-29 14:22:22 +08:00
|
|
|
|
}
|
2024-06-11 17:54:57 +08:00
|
|
|
|
dicWeight[playCfg.Id] = 0f; // 当前使用的权重置为0
|
2024-04-29 14:22:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2024-04-23 18:02:13 +08:00
|
|
|
|
|
2024-04-29 17:20:40 +08:00
|
|
|
|
#region 记录播放次数
|
|
|
|
|
|
if (playCfg.DayPlayCount > 0)
|
|
|
|
|
|
{
|
2024-06-11 17:54:57 +08:00
|
|
|
|
dialoguePlayData.DicCount.TryGetValue(playCfg.Id, out int count);
|
|
|
|
|
|
dialoguePlayData.DicCount[playCfg.Id] = count + 1;
|
2024-04-29 17:20:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2024-06-11 17:54:57 +08:00
|
|
|
|
int realId = roleId * RATIO + playCfg.Id;
|
2024-07-22 15:04:30 +08:00
|
|
|
|
string audioKey = GetAudioKey(roleId, playCfg.Id);
|
|
|
|
|
|
DebugUtil.Log($"角色id:{roleId}, 播放台词id:{playCfg.Id}, 优先级{playCfg.Priority},音频key:{audioKey}"); // 测试Log
|
2024-07-22 19:35:34 +08:00
|
|
|
|
//int audioId = await AudioManager.Instance.PlayAudio(GetAudioKey(roleId, playCfg.Id));
|
|
|
|
|
|
int audioId = AudioManager.Instance.PlayAudio(GetAudioKey(roleId, playCfg.Id));
|
2024-07-22 15:04:30 +08:00
|
|
|
|
callback?.Invoke(CommonUtils.GetLocalizeText(E_LocalizePrefix.Dialogue, realId));
|
2024-04-28 13:48:16 +08:00
|
|
|
|
|
2024-07-22 19:35:34 +08:00
|
|
|
|
return AudioManager.Instance.GetAudioByID(AudioCriManager.EPlayType.Speak, audioId);
|
2024-04-23 18:02:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-12 15:49:31 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 播放战斗台词
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public async void PlayFightDiaogue(int roleId, E_DialogueType dialogueType)
|
|
|
|
|
|
{
|
|
|
|
|
|
#region 初始化校验
|
|
|
|
|
|
if (!isInit)
|
|
|
|
|
|
{
|
|
|
|
|
|
DebugUtil.LogError("台词数据没有初始化");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 战斗类型台词校验
|
|
|
|
|
|
if (!IsFightTriggerType(dialogueType))
|
|
|
|
|
|
{
|
|
|
|
|
|
DebugUtil.LogError("不是战斗类型台词");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 获取要播放的战斗台词
|
|
|
|
|
|
if (!dicDialogue.TryGetValue(dialogueType, out List<DataDialogueCfg> listDialogueData))
|
|
|
|
|
|
{
|
2024-07-09 13:09:07 +08:00
|
|
|
|
DebugUtil.LogWarning($"没有{dialogueType}类型的台词数据");
|
2024-06-12 15:49:31 +08:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 数据校验
|
|
|
|
|
|
if (listDialogueData.Count < 1)
|
|
|
|
|
|
{
|
2024-07-09 13:09:07 +08:00
|
|
|
|
DebugUtil.LogWarning($"没有{dialogueType}类型的台词数据");
|
2024-06-12 15:49:31 +08:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
DataDialogueCfg cfg = listDialogueData[0];
|
|
|
|
|
|
|
|
|
|
|
|
#region 是否正在播放,正在播放比较优先级
|
|
|
|
|
|
if (curFightAudio != null && curFightAudio.IsPlaying)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (curFightDialoguePriority <= cfg.Priority)
|
|
|
|
|
|
{
|
|
|
|
|
|
curFightAudio = null;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 随机概率
|
|
|
|
|
|
if (!CommonUtils.RandomBool(cfg.TriggerProbability))
|
|
|
|
|
|
return;
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2024-06-13 15:41:51 +08:00
|
|
|
|
curFightAudio?.Stop();
|
|
|
|
|
|
|
2024-07-22 15:04:30 +08:00
|
|
|
|
string audioKey = GetAudioKey(roleId, cfg.Id);
|
|
|
|
|
|
DebugUtil.Log($"角色id:{roleId}, 播放台词id:{cfg.Id}, 优先级{cfg.Priority},实际音频key:{audioKey},概率:{cfg.TriggerProbability * 100}%"); // 测试Log
|
2024-07-22 19:35:34 +08:00
|
|
|
|
//int audioId = await AudioManager.Instance.PlayAudio(audioKey);
|
|
|
|
|
|
int audioId = AudioManager.Instance.PlayAudio(audioKey);
|
2024-06-12 15:49:31 +08:00
|
|
|
|
curFightDialoguePriority = cfg.Priority;
|
2024-06-13 15:41:51 +08:00
|
|
|
|
curFightDialogueType = dialogueType;
|
2024-07-22 19:35:34 +08:00
|
|
|
|
curFightAudio = AudioManager.Instance.GetAudioByID(AudioCriManager.EPlayType.Speak, audioId);
|
2024-06-12 15:49:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-22 15:04:30 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取音频key
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roledId"></param>
|
|
|
|
|
|
/// <param name="numId"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
private string GetAudioKey(int roleId, int numId)
|
|
|
|
|
|
{
|
|
|
|
|
|
const string KEY = "Voice";
|
|
|
|
|
|
|
|
|
|
|
|
string res;
|
|
|
|
|
|
if(numId < 10)
|
2024-07-22 18:31:37 +08:00
|
|
|
|
res= $"{KEY}_{roleId}_0{numId}";
|
2024-07-22 15:04:30 +08:00
|
|
|
|
else
|
|
|
|
|
|
res= $"{KEY}_{roleId}_{numId}";
|
|
|
|
|
|
|
|
|
|
|
|
return res;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-04-23 18:02:13 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 检查台词是否有效
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
private bool IsCheckValid(int roleId, DataDialogueCfg dataDialogueCfg)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (E_DialogueType dialogueType in dataDialogueCfg.DialogueType)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!IsCheckValidByOne(roleId, dialogueType))
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 检查个单个条件是否有效
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
/// <param name="dataDialogueCfg"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
private bool IsCheckValidByOne(int roleId, E_DialogueType dialogueType)
|
|
|
|
|
|
{
|
|
|
|
|
|
switch (dialogueType)
|
|
|
|
|
|
{
|
|
|
|
|
|
case E_DialogueType.Morning: // 上午
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime dateTime = CommonUtils.GetCurTime(CommonUtils.E_TimeType.Server);
|
|
|
|
|
|
return dateTime.Hour >= 6 && dateTime.Hour < 16;
|
|
|
|
|
|
}
|
|
|
|
|
|
case E_DialogueType.Afternoon:
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime dateTime = CommonUtils.GetCurTime(CommonUtils.E_TimeType.Server);
|
|
|
|
|
|
return dateTime.Hour >= 16 && dateTime.Hour < 21;
|
|
|
|
|
|
}
|
|
|
|
|
|
case E_DialogueType.Evening:
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime dateTime = CommonUtils.GetCurTime(CommonUtils.E_TimeType.Server);
|
|
|
|
|
|
return dateTime.Hour >= 21 && dateTime.Hour < 23;
|
|
|
|
|
|
}
|
|
|
|
|
|
case E_DialogueType.Midnight:
|
|
|
|
|
|
{
|
|
|
|
|
|
DateTime dateTime = CommonUtils.GetCurTime(CommonUtils.E_TimeType.Server);
|
|
|
|
|
|
return dateTime.Hour < 6 || dateTime.Hour >= 23;
|
|
|
|
|
|
}
|
|
|
|
|
|
case E_DialogueType.PlayerBirthday:
|
2024-04-29 17:20:40 +08:00
|
|
|
|
{
|
2024-05-29 15:01:28 +08:00
|
|
|
|
DateTime kanbanbanBirth = new(2024, 4, 29); // TODO 测试玩家生日
|
2024-04-29 17:20:40 +08:00
|
|
|
|
return CommonUtils.IsBirth(kanbanbanBirth);
|
|
|
|
|
|
}
|
2024-04-23 18:02:13 +08:00
|
|
|
|
case E_DialogueType.KanbanbanBirthday:
|
2024-04-29 17:20:40 +08:00
|
|
|
|
{
|
2024-06-06 13:00:46 +08:00
|
|
|
|
CharacterDataInfo characterDataInfo = CharacterDataInfoManager.Instance.GetCharacterInfo((uint)roleId);
|
|
|
|
|
|
if (null == characterDataInfo)
|
|
|
|
|
|
{
|
|
|
|
|
|
DebugUtil.LogError("未获取到角色");
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
DateTime dateTime = CommonUtils.GetTimeByTimestamp((uint)characterDataInfo.Cfg.BirthDay);
|
|
|
|
|
|
|
|
|
|
|
|
return CommonUtils.IsBirth(dateTime);
|
2024-04-29 17:20:40 +08:00
|
|
|
|
}
|
2024-05-29 16:55:12 +08:00
|
|
|
|
case E_DialogueType.Fetters: // 好感度
|
2024-04-23 18:02:13 +08:00
|
|
|
|
{
|
2024-05-29 16:55:12 +08:00
|
|
|
|
CharacterDataInfo characterDataInfo = CharacterDataInfoManager.Instance.GetCharacterInfo((uint)roleId);
|
2024-06-06 13:00:46 +08:00
|
|
|
|
if (null == characterDataInfo)
|
2024-05-29 16:55:12 +08:00
|
|
|
|
{
|
|
|
|
|
|
DebugUtil.LogError("未获取到角色");
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return characterDataInfo.IsMaxLikely(); // 是否满好感度
|
2024-04-23 18:02:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
case E_DialogueType.Awaken:
|
|
|
|
|
|
{
|
2024-04-24 14:52:18 +08:00
|
|
|
|
CharacterDataInfo characterDataInfo = CharacterDataInfoManager.Instance.GetCharacterInfo((uint)roleId);
|
|
|
|
|
|
if (characterDataInfo == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
DebugUtil.LogError("未获取到角色");
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return characterDataInfo.IsMaxAwake(); // 是否满觉醒
|
2024-04-23 18:02:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
default: // 其余条件默认满足
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-04-23 18:10:19 +08:00
|
|
|
|
|
2024-04-29 14:22:22 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 根据权重随机一个索引
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
private int RandomIndexByWeight()
|
|
|
|
|
|
{
|
|
|
|
|
|
float totalWeight = listDialogueWeight.Sum();
|
|
|
|
|
|
float randomWeight = Random.Range(0, 1f) * totalWeight;
|
|
|
|
|
|
|
|
|
|
|
|
totalWeight = 0f;
|
|
|
|
|
|
for (int i = 0; i < listDialogueWeight.Count; ++i)
|
|
|
|
|
|
{
|
|
|
|
|
|
totalWeight += listDialogueWeight[i];
|
|
|
|
|
|
if (randomWeight <= totalWeight)
|
|
|
|
|
|
return i;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
2024-06-12 13:11:09 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否触发类型
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
private bool IsTriggerType(E_DialogueType dialogueType)
|
|
|
|
|
|
{
|
|
|
|
|
|
return dialogueType switch
|
|
|
|
|
|
{
|
|
|
|
|
|
E_DialogueType.MainEnter or
|
|
|
|
|
|
E_DialogueType.MainClick or
|
|
|
|
|
|
E_DialogueType.Place or
|
|
|
|
|
|
E_DialogueType.QuickClick or
|
2024-07-22 17:52:05 +08:00
|
|
|
|
E_DialogueType.DrawGet or
|
2024-06-12 13:11:09 +08:00
|
|
|
|
E_DialogueType.Awakening or
|
|
|
|
|
|
E_DialogueType.UpLevel or
|
|
|
|
|
|
E_DialogueType.JoinTeam or
|
|
|
|
|
|
E_DialogueType.LevelWin or
|
|
|
|
|
|
E_DialogueType.LevelFailure => true,
|
2024-06-12 17:00:07 +08:00
|
|
|
|
_ => IsFightTriggerType(dialogueType),
|
2024-06-12 13:11:09 +08:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-12 15:49:31 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否战斗触发类型
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="dialogueType"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
private bool IsFightTriggerType(E_DialogueType dialogueType)
|
|
|
|
|
|
{
|
|
|
|
|
|
return dialogueType switch
|
|
|
|
|
|
{
|
|
|
|
|
|
E_DialogueType.FightEnterLevel or
|
|
|
|
|
|
E_DialogueType.FightBegin or
|
|
|
|
|
|
E_DialogueType.FightRetreat or
|
|
|
|
|
|
E_DialogueType.FightChoose or
|
|
|
|
|
|
E_DialogueType.FightMove or
|
|
|
|
|
|
E_DialogueType.FightAttack or
|
|
|
|
|
|
E_DialogueType.FightUseSkill or
|
|
|
|
|
|
E_DialogueType.FightBoardVehicle or
|
|
|
|
|
|
E_DialogueType.FightLeaveVehicle or
|
|
|
|
|
|
E_DialogueType.FightGetBuff or
|
|
|
|
|
|
E_DialogueType.FightKillEnemy or
|
|
|
|
|
|
E_DialogueType.FightRepelEnemy or
|
|
|
|
|
|
E_DialogueType.FightArmourDown or
|
|
|
|
|
|
E_DialogueType.FightArmourBloodZero or
|
|
|
|
|
|
E_DialogueType.FightKnockedDown or
|
|
|
|
|
|
E_DialogueType.FightStifleState or
|
|
|
|
|
|
E_DialogueType.FightRetreatState => true,
|
|
|
|
|
|
_ => false
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-13 13:18:56 +08:00
|
|
|
|
#region 回调
|
2024-06-12 13:11:09 +08:00
|
|
|
|
private void OnInit()
|
|
|
|
|
|
{
|
|
|
|
|
|
dicDialogue = new();
|
|
|
|
|
|
|
|
|
|
|
|
foreach (DataDialogueCfg cfg in TableManager.Instance.Tables.DialogueConfig.DataList)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (E_DialogueType dialogueType in cfg.DialogueType)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!IsTriggerType(dialogueType))
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
|
|
if (!dicDialogue.TryGetValue(dialogueType, out List<DataDialogueCfg> listDialogueData))
|
|
|
|
|
|
{
|
|
|
|
|
|
listDialogueData = new List<DataDialogueCfg>();
|
|
|
|
|
|
dicDialogue[dialogueType] = listDialogueData;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
listDialogueData.Add(cfg);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
isInit = true;
|
|
|
|
|
|
}
|
2024-06-13 13:18:56 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色被指挥官技能撤退
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightRetreat(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightRetreat);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 选中角色
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightChoose(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightChoose);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 移动角色
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightMove(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightMove);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色攻击
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightAttack(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightAttack);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色使用技能
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightUseSkill(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightUseSkill);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色登乘载具
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightBoardVehicle(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightBoardVehicle);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色离开载具
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightLeaveVehicle(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightLeaveVehicle);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色获得增益
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightGetBuff(int roleId)
|
|
|
|
|
|
{
|
2024-06-13 15:41:51 +08:00
|
|
|
|
if (IsPlayingFightDialogue && E_DialogueType.FightUseSkill == curFightDialogueType)
|
|
|
|
|
|
queueWaitGetBuffDialogue.Enqueue(roleId);
|
|
|
|
|
|
else
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightGetBuff);
|
2024-06-13 13:18:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色击杀敌人
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightKillEnemy(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightKillEnemy);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色击溃敌人
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightRepelEnemy(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightRepelEnemy);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色被攻击,装甲值降低
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightArmourDown(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightArmourDown);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色被攻击,装甲值降低
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightArmourBloodZero(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightArmourBloodZero);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色被击倒
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightKnockedDown(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightKnockedDown);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色进入被压制状态
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightStifleState(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightStifleState);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 角色进入溃败撤退状态
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roleId"></param>
|
|
|
|
|
|
private void OnFightRetreatState(int roleId)
|
|
|
|
|
|
{
|
|
|
|
|
|
PlayFightDiaogue(roleId, E_DialogueType.FightRetreatState);
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2024-04-23 18:02:13 +08:00
|
|
|
|
}
|