角色上阵台词语音
parent
9eab6324d2
commit
46cb60c793
|
|
@ -167,7 +167,8 @@
|
|||
INFIGHT_PLAYER_SKILL_VIEW_TRIGGER, // 指挥官技能view触发事件
|
||||
|
||||
INFIGHT_SUMMON_CREATED, // 召唤物准备完成
|
||||
|
||||
|
||||
INFIGHT_AUDIO_CREATED_ROLE, // 上阵角色
|
||||
INFIGHT_AUDIO_SELF_RETREAT, // 主动撤退音效
|
||||
INFIGHT_AUDIO_SELECT_UNIT, // 选择单位音效
|
||||
INFIGHT_AUDIO_CLICK_MOVE, // 移动单位音效
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Gameplay.Character
|
|||
{
|
||||
public partial class Character : GameUnit
|
||||
{
|
||||
|
||||
public int ConfigId;
|
||||
public CharacterRuntimeData runtimeData;
|
||||
public CharacterAnim cAnim;
|
||||
public ViewWeapon weapon;
|
||||
|
|
@ -23,6 +23,7 @@ namespace Gameplay.Character
|
|||
|
||||
public Character(uint id, CharacterConfigData configData, int troopId) : base(id, troopId, EGameUnitType.Character)
|
||||
{
|
||||
ConfigId = configData.cfgId;
|
||||
debugShowInfo = configData.debugShowInfo;
|
||||
commonData.level = configData.level;
|
||||
avatarType = EAvatarType.Human;
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ public class DialogueManager : Singlenton<DialogueManager>, IInitable, IUpdatabl
|
|||
EventManager.Instance.Register(EventManager.EventName.AllConfigLoad, OnInit);
|
||||
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_CREATED_ROLE, (Action<int>)OnFightCreateRole);
|
||||
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);
|
||||
|
|
@ -171,6 +172,7 @@ public class DialogueManager : Singlenton<DialogueManager>, IInitable, IUpdatabl
|
|||
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_CREATED_ROLE, (Action<int>)OnFightCreateRole);
|
||||
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_SELECT_UNIT, (Action<int>)OnFightChoose);
|
||||
EventManager.Instance.Unregister(EventManager.EventName.INFIGHT_AUDIO_SELF_RETREAT, (Action<int>)OnFightRetreat);
|
||||
EventManager.Instance.Unregister(EventManager.EventName.AllConfigLoad, OnInit);
|
||||
|
|
@ -613,6 +615,15 @@ public class DialogueManager : Singlenton<DialogueManager>, IInitable, IUpdatabl
|
|||
PlayFightDiaogue(roleId, E_DialogueType.FightChoose);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上阵角色
|
||||
/// </summary>
|
||||
/// <param name="roleId"></param>
|
||||
private void OnFightCreateRole(int roleId)
|
||||
{
|
||||
PlayFightDiaogue(roleId, E_DialogueType.FightEnterLevel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移动角色
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -275,7 +275,12 @@ namespace Gameplay.Level
|
|||
switch (unitType)
|
||||
{
|
||||
case SingleTeamCharacterInfo.CharacType.Hero:
|
||||
await _CreateCharacter(TeamManager.Instance.SelectID, worldPosition, yaw);
|
||||
{
|
||||
GameUnit gameUnit = GameUnitManager.instance.totalUnits.Search(TeamManager.Instance.SelectID);
|
||||
if(gameUnit is Character.Character character)
|
||||
EventManager.Instance.Send(EventManager.EventName.INFIGHT_AUDIO_CREATED_ROLE, character.ConfigId);
|
||||
await _CreateCharacter(TeamManager.Instance.SelectID, worldPosition, yaw);
|
||||
}
|
||||
break;
|
||||
case SingleTeamCharacterInfo.CharacType.Vehicle:
|
||||
await _CreateVehicle(TeamManager.Instance.SelectID, worldPosition, yaw);
|
||||
|
|
|
|||
Loading…
Reference in New Issue