64 lines
1.8 KiB
C#
64 lines
1.8 KiB
C#
|
|
using System.Collections.Generic;
|
|||
|
|
using cfg.FightCfg;
|
|||
|
|
using Framework;
|
|||
|
|
using Gameplay.Utils;
|
|||
|
|
using UnityEngine;
|
|||
|
|
namespace CharacterBuilder
|
|||
|
|
{
|
|||
|
|
public class NpcBuildData : BaseRoleBuildData
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
public readonly DataFightNPC mainConfig;
|
|||
|
|
|
|||
|
|
public NpcBuildData(DataFightNPC mainConfig)
|
|||
|
|
{
|
|||
|
|
this.mainConfig = mainConfig;
|
|||
|
|
|
|||
|
|
var weaponConfig = EditorTableManager.instance.tables.WeaponConfig.Get(mainConfig.WeaponId);
|
|||
|
|
if (weaponConfig != null)
|
|||
|
|
{
|
|||
|
|
weaponConfigList.Add(weaponConfig);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
emojiExt = new EmojiExtInfo();
|
|||
|
|
emojiExt.emojiId = mainConfig.DefaultEmojiImgId;
|
|||
|
|
emojiExt.eyebowsColor = mainConfig.EmojiEyeBowsColor;
|
|||
|
|
emojiExt.eyesColor = mainConfig.EmojiEyesColor;
|
|||
|
|
|
|||
|
|
if (mainConfig.SkillId == 0)
|
|||
|
|
{
|
|||
|
|
noSearchSkill = true;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
noSearchSkill = false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public override void RebuildAll(Dictionary<string, AnimationClip> clipDict)
|
|||
|
|
{
|
|||
|
|
if (weaponConfigList.Count == 0)
|
|||
|
|
{
|
|||
|
|
Debug.LogError($"对象:{mainConfig.NameId}未配置武器,取消导出");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
var nameId = mainConfig.NameId;
|
|||
|
|
var srcPath = PathEx.GetNPCSrcModelPath(nameId);
|
|||
|
|
_Rebuild(clipDict, srcPath, nameId, nameId);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public override string CheckAnims(Dictionary<string, AnimationClip> dict)
|
|||
|
|
{
|
|||
|
|
var nameId = mainConfig.NameId;
|
|||
|
|
var checkInfo = _CheckAnims(dict, nameId, mainConfig.NameId);
|
|||
|
|
if (!string.IsNullOrEmpty(checkInfo))
|
|||
|
|
{
|
|||
|
|
return checkInfo;
|
|||
|
|
}
|
|||
|
|
return null;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|